conditional setvalue expressions? IF, IIF

Avatar

Avatar
Validate 1
Level 2
g5spark
Level 2

Likes

8 likes

Total Posts

73 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
g5spark
Level 2

Likes

8 likes

Total Posts

73 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
g5spark
Level 2

19-11-2015

i have a workbench workflow and i want to do the following:

if (/xpath/field = 'Y')

set target to 1

else

set target to 0

is it possible?

Location: A

Expression: if (/xpath/field = 'Y'), 1:0

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 4
Mark_Lindberg
Level 4

Likes

8 likes

Total Posts

211 posts

Correct reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 4
Mark_Lindberg
Level 4

Likes

8 likes

Total Posts

211 posts

Correct reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
Mark_Lindberg
Level 4

19-11-2015

The way to accomplish this is with conditional routes. Optionally going to one set-value or the other depending on your condition(s).

Be sure to set the route evaluation on the upstream service to check the conditional route before the default route.

Best practice is to always have one un-conditional route defined, and have it listed last in the evaluation sequence.

HTH

Mark

846391_pastedImage_0.png