Overview
The Condition Action is used to run other Actions based on the state of the App. When a Condition Action is performed, it will run other specified Actions based on information such as user inputs or the value of a Variable. For instance, a Condition Action can be used to perform a Run Data Flow Action if the user's input is valid, or show an error message if it is not.
A Condition Action may include any number of ELSE IF branches to set additional conditions and responses, and up to one ELSE branch that will run if none of the other conditions are met. A Condition Action may also be used within another Condition Action to set up whatever behavior is required by the App.
To add ELSE or ELSE IF branches to a Condition Action, press the + icon next to the Condition label in the Tree:
To add Actions to a branch, press the + icon next to the IF... label in the Tree:
Use Cases
- Use a Condition Action to set a Variable to a different value depending on any condition
- Personalize a Form based on user data, adapting an App's UI to whatever a given customer needs
- Use a Condition Action to run a Data Flow if the user's input passes validation, or show an error message if it does not
Action Properties
IF... Branch
The Condition Action always has this branch. If the Airscript Expression in this branch returns TRUE, the branch's Actions will be executed.
ELSE IF... Branch
An ELSE IF branch will run its condition if the branch above it has a condition that is FALSE. When that happens, if the condition in the ELSE IF branch is TRUE, the Actions in the branch will be executed.
Any number of ELSE IF branches may be added to a Condition Action.
ELSE Branch
The ELSE Branch will run its Actions if every branch above it has conditions that are FALSE. The ELSE branch does not have a condition; it will always run if the branches above it do not run.
There can be only one ELSE branch in a Condition. It is also possible to not have an ELSE branch.