Condition
The Condition step determines the next step in the action by evaluating a JavaScript expression. Return true
to execute the if step, or false
to execute the else step.
Variables
Built-in variables
The following built-in variables are available for the Condition step:
While {{data}}
and {{error}}
are specific to a particular step, {{params}}
is available in all steps.
Using variables
Optional chaining
If, at some point, the variable's value is null
or undefined
, an optional chaining operator ?.
can be used to access a specific key.
For example:
Use case examples
Execute the true
step if the data
array has some items:
Execute the true
step if the component's value is set:
Check user role:
Check multiple user roles:
Check that at least one user role is present:
Last updated
Was this helpful?