Condition Builder
Conditions are used to compare two values. The condition builder enables you to use condition statements in your Workflows. The condition builder is used in the following situations on the Blink platform:
- To trigger Event-Based Workflows.
- To configure if or if else statements.
Additional conditions can be applied to limit which events trigger a Workflow. For example, if your Workflow is triggered when an event is received, you can add a condition stating that it will run only if it is received by a user with a specific ID.
The condition builder supports AND and OR operators.
- An AND operator requires that the statement satisfies two conditions.
- An OR operator requires that the statement satisfies at least one of two conditions.
Using the Condition Builder in an Event-Based Workflows
- When creating an Event-Based Workflow, in the Trigger setup, select a service provider, and the action you wish to trigger the Workflow.
- Activate Add condition. The condition builder consist of three parts; the left value, the operator, and the right value.
- To apply a condition, click on and enter each value. Select an operator from a menu that appears when you click on it.
- Use AND or OR operators to further define your statement. The condition appears in the text window on the right side.
- Click Apply.
Using the condition builder in an if or if else statement
- On the Editor page, select an if or if else action.
The condition builder consist of three parts: The left value, the operator and the right value.
To apply a condition, click on and enter each value. Select an operator from a menu that appears when you click on it.
Use AND or OR operators to further define your statement. The condition appears in the text window on the right side.
Conditions
The following condition operators can be used to create a condition statement:
1. Equals
x = bThe Action is executed when the left value is equal to the specified right value.
2. Not equals
x != yThis condition is the opposite of the equals condition. The Action is executed when the left value DOES NOT equal to the specified right value.
3. Less than
The Action is executed when the left value is less than the specified right value.
4. Less than or equals to
The Action is executed when the left value is less than or equal to the specified right value.
5. Greater than
x > yThe Action is executed when the left value is greater than the specified right value.
6. Greater than or equals to
x >= yThe Action is executed when the left value is greater than or equal to the specified right value.
7. Contains
The Action is executed if the left value contains the right value.
8. Not contains
The Action is executed if the left value DOES NOT contain the right value.
9. Starts with
The Action is executed if the left value starts with the specified right value.
10. Ends with
The Action is executed if the left value ends with the specified right value.
11. Regex match
The Action is executed if the left value matches a Regular Expression.
12. Is empty
The Action is executed when the specified event has a null value, or has an empty array, object, or string . When selecting this operator, the option to set the right value shouldn't exist.
13. Is not empty
The Action is executed when the specified event DOES NOT have a null value, empty array, object, or string. When selecting this operator, the option to set the right value shouldn't exist.
14. Is true
The Action is executed if the left value is true. When selecting this operator, the option to set the right value shouldn't exist.
15. Is false
The Action is executed if the left value is is false. When selecting this operator, the option to set the right value shouldn't exist.