What is the syntax for an IF condition with multiple conditions?
I was struggling to figure out how to write an IF statement that contained multiple conditions. Such as
IF value = A or Value = B
I couldn't find anything the got me there directly, but found something that got me the answer, but thought I would post here.
OR = ||
AND = &&
So for my statement it look liked this within the condition field of the IF statement in workflow 5 to test for two options.
=$LeakRepairForm.state.CausedropDownList.value === "UNDT" || $LeakRepairForm.state.CausedropDownList.value === "RBOL"
Hope this helps someone else or me when I forget how to do it later.
-
Works great for two values, but what if there are three? Can't find the correct syntax for that one.
0 -
just keep adding operators like:
=$LeakRepairForm.state.CausedropDownList.value === "UNDT" || $LeakRepairForm.state.CausedropDownList.value === "RBOL" || $LeakRepairForm.state.CausedropDownList.value === "THIS" || $LeakRepairForm.state.CausedropDownList.value === "THAT"
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer