if statements in JSON

Hello,

Does teamdynamix support JSON if statement that were adding in Draft 07 (https://json-schema.org/draft-07/json-schema-release-notes.html)?

In this case I'm trying to set a feed comment to one thing if another field is set to true, and set it to a different thing if the field is set to false.

I can do this with a condition step and 2 web service calls, but I'd prefer not do so if I can help it.

(for reference, my web service method looks something like this.  This one is just a sample I was using to test the theory, but it should hold up:

{
  "NewStatusID":0,  
  "if": { "{{Advisor}}" : "true"},
  "then": { 'Comments':"User needs advising. Advising Type: {{AdvisingType}}"},
  "else": { 'Comments':"User does not need advising access."},
  "IsPrivate":true
}

The error I get is that Comments is required, so I assume this type of validation is not yet supported, but thought I'd ask.

Thanks,

Robert

Tags webapi json
Asked by Robert Howe on Tue 6/11/19 7:11 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Wed 6/12/19 9:25 AM

Hello Robert,

You are correct, this is not currently supported within web service steps in TeamDynamix workflows.

Sincerely,
Mark Sayers
TD Support

No feedback
Thanks for the confirmation. I'll submit an enhancement request - Robert Howe Wed 6/12/19 10:04 AM