• Documentation
  • Ask a Question
  • Zeroplat.io
  • Documentation
  • Ask a Question
  • Zeroplat.io
  • Introduction
    • Welcome to Zeroplat
    • Video Intro
  • Get Started
    • Requirements
    • Installation
  • Management
    • Resources
    • SaaS
      • Multi-tenancy
      • Editions
    • Permissions
    • Organization Units
    • Language
      • Languages
      • Language Texts
    • Roles
    • User
      • Users
      • Invite Users
    • Audit Logs
  • Visual Builder
    • Overview
    • Resources
      • Menu & Navigation
      • Pages
      • Dashboards
      • Components
      • Generate Pages from Datasource
    • Design
      • JS Query
      • Transformer
      • Variable
    • Event Designer
      • Tasks
        • Execute query
        • Start workflow
        • Show page
        • Close Page
        • Set variable
        • Show notification
        • Set components props
      • Switch
        • If
        • Confirm box
        • Confirm popover
    • Data
    • Preview & Publish
    • Components
      • Common Properties
        • Layout
        • Style
        • Actions
        • Validations
        • Tooltip
      • Inputs
        • Button
        • Input
        • InputNumeric
        • ComboBox
        • MulticolumnCombobox
        • Checkbox
        • CheckboxGroup
        • Switch
        • RadioGroup
        • ToggleButtonGroup
        • LocalizedInput
        • Slider
      • Business
        • OrganizationUnitBrowser
        • RoleBrowser
        • UserBrowser
      • Data display
        • DataGrid
      • Editors
        • QuillEditor
      • Feedback
        • Alert
        • Progress
      • File
        • Dropzone
        • FileButton
        • FileInput
      • Layout
        • SplitLayout
      • Navigation
        • TabBar
      • Pickers
        • DatePicker
        • DateTimePicker
        • DateRangePicker
        • DateCalendar
        • TimePicker
        • IconPicker
      • Surfaces
        • Card
      • Charts
        • AreaChart
  • Backend
    • Overview
  • Integrations
    • Overview
    • Environments
    • Database
      • MS SQL
      • SQL Lite
      • My SQL
      • PostgreSQL
    • API
      • Rest API
      • SMTP
      • Google Sheets
      • Twillio SMS
    • Javascript
      • Variable
      • Transformer
      • JS Query
    • Zeroplat Hosted
      • Zeroplat E-mail
  • Workflow (BPM)
    • Overview
    • Building and managing workflows
    • Inbox
    • Outbox
  • Marketplace
    • Overview
    • Management

If

7 views 0

Written by Zeroplat
17 September 2025

The If task is a conditional branching operator in Zeroplat’s Event Designer. It evaluates a given query (expression) and based on the result (true or false), the workflow continues along the corresponding branch.

This is similar to an if statement in programming, allowing you to add logic and control flow to your event sequences.

Purpose

  • Apply conditional logic in workflows.
  • Execute different tasks depending on dynamic data or user input.
  • Control when queries, notifications, or actions should run.
  • Avoid unnecessary operations if conditions aren’t met.

Anatomy

  1. Step name
    • Label for the task in the flow.
    • Default: if.
  2. Query
    • The conditional expression to evaluate.
    • Must return a boolean value (true or false).
    • Syntax supports bindings (e.g., {{ Input1.value == "John" }}).
    • Example: {{ variable1.isAdmin }} or {{ Input1.value == "jhon" }}
  3. Branches
    • True branch → Executes if the expression evaluates to true.
    • False branch → Executes if the expression evaluates to false.

How It Works

  1. When the If task runs, the expression in Query is evaluated.
  2. If the result is true, the workflow continues along the true branch.
  3. If the result is false, the workflow continues along the false branch.
  4. Both branches can contain one or more tasks (e.g., show notification, run queries, set variables).

Example 1: Input Validation

Condition

{{ Input1.value == "admin" }}

True branch: Show notification → “Welcome, admin!”
False branch: Show notification → “Access denied.”

Example 2: Variable-Based Check

Condition

{{ variable1.balance > 1000 }}

True branch: Execute query → approveLoan
False branch: Show notification → “Insufficient balance.”

Example 3: Combined Expression

Condition

{{ (Table1.selectedRow.status == "Active") && (variable1.isAdmin) }}

True branch: Show page → Edit form
False branch: Show notification → “You are not allowed to edit inactive records.”

Best Practices

  • Keep expressions simple → For complex logic, use a Transformer or JS Query, then return a boolean for the If task.
  • Name your steps clearly → e.g., ifUserIsAdmin instead of just if.
  • Use variables → Store reusable conditions in variables to simplify expressions.
  • Combine with notifications → Great for showing validation errors or guiding users when conditions aren’t met.

FAQ

Q: Can I use multiple conditions?

  • Yes, using logical operators:
    • && (AND), || (OR), ! (NOT).

Q: What if the expression doesn’t return true/false?

  • Non-boolean values may lead to unexpected behavior. Always ensure the result is strictly boolean.

Q: Can If tasks be nested?

  • Yes. A true/false branch can contain another If task for more complex decision trees.

👉 In summary: The If (Switch) task is the key to adding conditional logic in Zeroplat workflows. It enables dynamic, data-driven branching so that applications can react intelligently to user input and system state.

Was this helpful?

Yes  No
Related Articles
  • DateCalendar
  • Progress
  • TimePicker
  • IconPicker
  • DateTimePicker
  • DateRangePicker

Didn't find your answer? Contact Us

Previously
Switch
Up Next
Confirm box
Copyright 2025 Zeroplat.io. All Rights Reserved