NAl
4 years agoContributor
Router Snap Expression for checking Value
We have a Router Snap that evaluates a string and checks whether it matches one of a set of predefined values. I can’t seem to get the expressions right and think a short circuit evaluation is at pla...
- 4 years ago
Hi @NAl,
The second expression is wrong because that way if the Status is ‘X’ or ‘Y’ or ‘Z’ it will return true to both outputs.
You should change the second expression to$Status != "X" && $Status != "Y" && $Status != "Z"
, this way it will only evaluate to true if status is neither x, y nor z.
Also first expression should be:$Status == "X" || $Status == "Y" || $Status == "Z"