Condition Step
Last updated
Last updated
With the Condition step, you can go to different steps/sub flows depends on conditions.
In your Condition step, click on "+ Add Condition Group" to set at least one condition group. "Otherwise" group is always there.
You can make as many condition groups as you need. The matching start from the top to the bottom, once a group matched, the system goes to a named step. When it fails to match all condition group, the "Otherwise" group will take over it. So it's always a good practice to name a step in the "Otherwise" group even it is very unlikely to be used.
Another important thing to know is the difference between "All conditions" and "Any conditions". It is sitting at the upper right corner of each condition group.
You can list more than 1 condition in a condition group. When you do, it matters whether you choose "All" or "Any".
"All Condition" means to get this group matched, you will need to have all the conditions matched in the group.
However, to get a group with "Any Condition" matched, you only need to have one of the conditions matched.
For tag and sequence condition, you can choose "in" or "not in" from the "Operator". Choosing multiple tags/sequences is allowed.
These are all the operators for text condition.
For "has any value" and "is empty" of all variable types, when you clear a variable, the variable becomes empty. Thus, "has any value" is false and "is empty" is true for this variable.
These are all the operators for number condition.
These are all the operators for DateTime condition.
Note that you will need to put "value" always as the correct format "yyyy-MM-dd HH:mm:ss" no matter which displayed format you choose for that variable.
"before/after" is different from "time before/after". The former compare the whole datetime value while the latter only compare the time value.
These are all the operators for JSON condition.
The very last 3 operators, "has item matched with ...", require the JSON to be a list of variables, not a list of JSON. In other words, if your JSON is storing a list of normal variables, these 3 operators work. They won't work for a JSON storing a list of JSON.
Custom input is built for compare values in JSON variable. Search "custom input" in the if field:
Pick a value from a JSON, then you can compare it as you use the text variable condition.
With this operation, you can now do formula calculation directly in the Action Step - "Set Variable Value" and Condition Step - "Value".
Math operations and function supported:
+, -, *, e, pi, PI, abs(), min(), max(), ceil(), floor(), log(), pow(), round(), sqrt(), sin(), cos(), tan()
Please note that
If the formula is invalid, the system will return 0 to number variable and empty to text variable.