StableAction
If / else
Overview
Runs one list of actions when a condition is true and another when it is false.
Purpose
Branch on who the user is, what they entered or what a record contains: send different emails by status, go to a different page for staff, skip a step when a field is empty.
Inputs
- If — a condition built in the condition editor: compare any dynamic value (Current user › role, Form › total, Current record › Status, Event › value…) with an operator (is, is not, >, contains, is empty, is one of…). Combine several with all / any / not.
- Then — actions to run when the condition is true.
- Else — actions to run otherwise (can be empty).
Configuration
- Comparisons are case-insensitive and numeric text is compared as numbers (the text
10equals the number10). - Nest If / else inside Then or Else for more cases; up to 30 actions per branch.
Outputs
- None of its own; nested actions behave normally and their results are available afterwards.
Example
Staff go to the admin dashboard
Example
Button “Continue” › On click:
1. If / else
If: Current user › role is “Staff”
Then: Go to page Admin dashboard
Else: Go to page My bookingsErrors
- A reference to a deleted field or component makes that side of the comparison empty — the condition then usually evaluates to false.
Limitations
- Conditions compare values; they cannot query the database. Use a KPI/aggregate binding or a workflow for counts.
- Visibility rules on components are a lighter alternative when you only need to show or hide something.
Advanced
- Schema:
{ type: "condition", condition: Condition, then: Action[], else?: Action[] }withCondition = compare | all | any | not. Evaluated in the browser withevaluateCondition; server actions inside the branches are still executed by reference.