Expression in Switch activity to select substring branch
Hi, I have a Switch activity and require substring to be recognised and that branch taken:
ie: $value5.result.includes()
this throws error (is expecting a substring ?)
thanks
-
Hi Vincent,
It seems that the `includes()` function is not getting a string argument. Can you check the parameter and make sure it's a string?
Rafael
0 -
Thanks for your message Rafael.
I can confirm its a string and coming from Create Value activity.
But how a range of substring gets identified from it and then branched from the Switch activity?
thanks
0 -
Hi Vincent,
It's hard to say exactly what's going on without seeing the workflow. Can you submit a help ticket and send the workflow JSON (File > Export) as an attachment?
Thanks,
Rafael
0 -
Won't the .includes() return a boolean (true/false) and in this case can't be used in a Switch Activity?
0 -
The Switch activity can accept Boolean values: see Inputs.
1 -
Do'h - Ignore me! I've only used it for string inputs/outputs and have used the IF activity for the boolean outputs.
0 -
Understandable! I wasn't sure about this myself until I checked. I don't use Switch for boolean values either.
0 -
Thanks Rafael and Nelson for your help, lodging a ticket with the workflow attached, cheers
0 -
request id #35600 thanks
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
9 Kommentare