The Condition Builder
The Condition Builder is used to define conditions for use in flows or compositions. Conditions are used both in Flow Builder and Composition Builder:
- In Flow Builder you can insert conditional blocks that split the flow into lanes based on true and false logic with deep customization
- In Composition Builder you can define conditions so that templates are only inserted if a certain condition is true
Conditions consist of one or more subconditions, that can be grouped into groups, groups of a group and continuing on to be as complex as needed.
Managing conditions
Creating subconditions
|
1.
|
In the Flow Builder, select Edit Condition. |
|
2.
|
To create a subcondition in an empty condition, select Create. |
This creates an AND group by default and a new condition.
|
3.
|
If you want to add more subconditions to the condition, select the group under which you want to create a condition. |
This adds another condition under the selected group.
|
5.
|
Configure your condition. |
Creating groups
You can group subconditions together in an AND or an OR group so that either all of the subconditions must be true, or just one of them.
|
1.
|
Select one of the conditions you want to group. |
|
2.
|
Hold down the Ctrl key and select the other conditions you want to group together. |
To ungroup the conditions, select the AND/OR group and select Ungroup.
|
4.
|
(Optional) To change the group from an AND to an OR or vice versa, select it, and choose the group type to the right. |
Defining a subcondition
Subconditions can utilize different check types to evaluate the condition. There are 4 check types. To view a subcondition's properties, select it in the Edit Condition dialog. Select a subcondition to bring up its properties to the right. The most important is the check type.
No condition |
No condition is the default check type, and has no fields to check. |
Occurs |
Checks if a field occurs in the data set. This subcondition returns as TRUE when the selected field is found at least once.
|
Occurs multiple times |
Checks if a field occurs a number of times.
|
Value |
Checks a field's value against another value. Most users utilize this function to validate and match values between fields.
|
Occurs
Occurs checks if a field occurs in the data set. This subcondition returns as TRUE when the selected field is found at least once.
To select a particular field:
|
1.
|
In Field, select the pencil. |
|
2.
|
From the Select a field to use dialog, select the field to check. |
You can also choose to treat empty fields as if they don't occur. For standard data sets, this is most likely the option you want.
Occurs multiple times
Occurs multiple times checks if a field occurs a number of times. You can use any of the following operators:
- Does not equal
- Equals
- Is between
- Is greater than
- Is greater than or equal to
- Is less than
- Is less than or equal to
- Is not between
Create an Occurs multiple times subcondition
Create a subcondition for an Occurs multiple times instance
|
1.
|
In Field, select the pencil. |
|
2.
|
From the Select a field to use dialog, select the field to check. |
|
4.
|
In the Operator dropdown, select your operator parameter. |
|
5.
|
In the Value field, enter your value. |
Example: Return TRUE if the value of the multi-field is between 2 and 5
Here's an example that will return TRUE if the value of the multi field is between 2 and 5. Notice the link icon next to the fields:
Click this to change the field to a linked field. You can then click the pencil to select a data set field.
The select a field to use window displays.
This allows you to check values of fields against values of other fields.
Value
A Value subcondition checks a field's value against another value. Most users utilize this function to validate and match values between fields.
The field type can be one of the following options:
- Date
- Date & time
- Number
- Text
- Time
- True/false
Depending on the field type selected, different operators are available.
Create a subcondition for a Value instance
|
1.
|
In Field, select the pencil. |
|
2.
|
From the Select a field to use dialog, select the field to check. |
|
4.
|
In the Field type area, select your field type parameter. |
|
5.
|
In the Operator area, select your operator parameter. |
|
6.
|
In the Value dropdown menu, select your value. |
Example: Check for Relationship type field
In this example - we check whether the Relationship type field contains a value from the dropdown menu. The dropdown menu lists all the values listed in a label form. If you know the value of your field then select the ABC button and enter the value.
Notice the link icon. As explained in Occurs multiple times, this allows you to check values of fields against values of other fields.