Page rules
Add rules to a page condition to define when to trigger an operation on the page.
Page rules form the IF- part of the IF-THEN conditional logic for a page condition.
Page Rules typically consist of two parts - a WHEN and IF expression, separated by a Criteria comparison operation. This format allows you to compare two different components on a page, such as whether one value on a component matches another value on a different component.
Some comparisons may not require another component, for example, if you are checking whether the value of a toggle page component Boolean value is simply either true or false:
IF [Toggle] [Toggle checked Boolean] [Value] [Equal To] [Value: $True]
Once you have configured a page rule, you must then add a page operation to define what actually happens on the page when the rule conditions are met. This forms the -THEN part of the IF-THEN conditional logic. Refer to Page operations.
Add a page rule
-
Click Add rule on the Configure page conditions panel.
-
In the WHEN section, do one of the following:
-
If you select Component Changes, specify the following:
- Component: Select the component you want to compare from the drop-down. Your rule only applies when the component you select changes on the page.
-
If you select Page Loads, your rule applies when the page loads.
-
-
In the IF section, specify the following:
- Value: Click Select or create a new value to choose or create the value you want to set.
- Criteria: Select the criteria you want to use for the comparison from the drop-down.
- Component/Value: Select the page component and property you want to evaluate against the criteria, or select the value you want to evaluate against the criteria.
-
Click Apply to add the rule to the page condition.
-
Optional: Click the Move up or Move down arrow icon in the Actions column to define the order in which you want your rules evaluated. Flow evaluates the rules at the top of your list first, then continues down your list in sequence.
-
Optional: Click Add rule to add more page rules, and repeat steps 2–4 for each rule you want to add. Use the Combine page rules using drop-down menu to define how you want your rules applied:
-
AND: Results in an expression of "IF BOTH Page Rule A AND Page Rule B are true".
-
OR: Results in an expression of "IF EITHER Page Rule A OR Page Rule B is true"
-
-
Add a page operation to define what actually happens on the page when the rule conditions are met. Refer to Page operations.
Example page rules
| Example page rule | Configuration and description |
|---|---|
Check whether the value selected in a radio page component (SelectedRadioObject) matches another value (Other) | - WHEN Component Changes: Radio - IF Value: SelectedRadioObject (String) - Criteria: Equal To - Value: Other (String) This applies the following condition: IF the [Radio] Component is EQUAL TO the [String:Other] Value |
| Check whether a toggle component has been selected by a user on a page | - WHEN Component Changes: Toggle - IF Value: Togglechecked (Boolean) - Criteria: Equal To - Value: $True (Boolean) This applies the following condition: IF [Toggle] [Toggle checked Boolean] [Value] [Equal To] [Value: $True] |
Component properties
| Property | Description |
|---|---|
| Editable | Defines if a component can be modified. Relevant for input fields to restrict editing under certain conditions. |
| Enabled | Dictates if a component is active or inactive. An inactive component might be greyed out and unresponsive. |
| Required | Specifies if an input or selection is mandatory. In forms, certain fields might be required before submission. |
| Visibility | Controls if a component is shown or hidden. Useful for dynamic interfaces where options appear based on previous inputs. |
| Value | Represents the data of a component. For input fields, this is the text entered by the user. It is read-only and used for comparisons. |
Criteria
| Operation | Description |
|---|---|
| Is Empty | Checks whether the value of a left page component is empty, such as for an empty string value. |
| Is Not Empty | Checks whether the value of a left page component is not empty. |
| Equal To | Checks whether the value of the left page component is equal to the value of the right page component. |
| Less Than Or Equal To | Checks whether the value of the left page component is less than or equal to the value of the right page component. |
| Greater Than Or Equal To | Checks whether the value of the left page component is greater than or equal to the value of the right page component. |
| Greater Than | Checks whether the value of the left page component is greater than the value of the right page component. |
| Less Than | Checks whether the value of the left page component is less than the value of the right page component. |
| Not Equal To | Checks whether the value of the left page component is not equal to the value of the right page component. |
| Contains | Compares content within two string values. Checks whether the whole value of the right page component is contained anywhere within the left page component value. |
| Starts With | Compares the beginning of two string values to check whether the value of the left page component starts with the value of the right page component. |
| Ends With | Compares the end of two string values to check whether the value of the left page component ends with the value of the right page component. |
| Does Not Contain | Compares content within two string values. Checks whether the value of the right page component is not contained anywhere within the left page component value. |