Skip to Content

Conditional

Configure conditional branches to run different actions based on data state, user input, or page state. Conditions are evaluated top to bottom; the first match runs its actions and stops further evaluation.

Overview

Conditional actions enable flexible business logic:

  • Login state: Run different flows for signed-in vs. anonymous users
  • Form validation: Check required fields and input rules
  • Permission control: Show or hide features by user role
  • Data state: Branch based on whether records exist or match criteria

Configuration

Parameters

ParameterTypeRequiredDescription
Sub-condition nameStringYesDisplay name for debugging and organization
Condition expressionExpressionYesExpression with data binding and logical operators
ActionsActionsYesActions to run when the condition is true

Setup

Add a conditional action

In a component’s interaction settings, add a Conditional action. Two sub-conditions are created by default.

Configure sub-conditions

  • Click a sub-condition name to rename it
  • In the operand area, set the evaluation expression (supports data binding and logic)
  • In the Actions area, configure what runs when the condition is true

Add more conditions

Click + to add sub-conditions. They are evaluated from top to bottom.

Set a default branch

Set the last sub-condition to Always as a fallback when no earlier condition matches.

Output

No direct output. Matching sub-condition actions run automatically.

Notes

  • Evaluation order: Top to bottom; the first true condition wins
  • Minimum setup: At least one sub-condition is required
  • Default branch: Use an Always condition as a catch-all
  • Expressions: Support AND, OR, NOT, and comparison operators

Special Comparison Operators

OperatorDefinitionUse Case
NullValue is emptyCheck if an input is blank
Not nullValue is not emptyCheck if an input has data
IncludedValue exists in a collectionFilter by membership in a list
Not includedValue not in a collectionExclude items from a list
Similar toFuzzy matchSearch or filter similar values
Not similar toNot a fuzzy matchExclude similar values

Platform Support

  • Web
  • Native App

Examples

Purchase login check

// Condition 1: User not signed in Expression: current user == null Actions: Navigate to login page // Condition 2: User signed in (Always) Expression: Always Actions: Navigate to checkout page

Registration validation

// Condition 1: Name empty Expression: name_input.value == "" Actions: Show toast "Please enter your name" // Condition 2: Phone empty Expression: phone_input.value == "" Actions: Show toast "Please enter your phone number" // Condition 3: Info complete (Always) Expression: Always Actions: Submit registration

Event registration validation

// Condition 1: Incomplete info Expression: name_input.value == "" || phone_input.value == "" Actions: Show modal "Please complete registration info" // Condition 2: Complete (Always) Expression: Always Actions: Submit registration + show success toast

Role-based access

// Condition 1: Admin Expression: current user.role == "admin" Actions: Navigate to admin dashboard // Condition 2: Regular user Expression: current user.role == "user" Actions: Navigate to User Center // Condition 3: Unauthorized (Always) Expression: Always Actions: Show toast "Insufficient permissions"
Last updated on