Skip to content

Workflows and Variables ​

The Workflows and Variables section allows you to manage application logic, define events, and configure variables that control your application's behavior and data flow.


Overview ​

This section enables you to:

  • Define workflows that respond to user actions
  • Configure events that trigger actions
  • Manage variables for storing and passing data
  • Create dynamic behavior in your application

Accessing Workflows and Variables ​

  1. Open the Website Builder
  2. Look for the Workflows or Variables section in the builder interface
  3. Access workflow configuration from element events

Understanding Workflows ​

What is a Workflow? ​

A workflow is a sequence of actions that execute in response to a trigger:

┌─────────────────────────────────────────────────────────────┐
│                      WORKFLOW STRUCTURE                      │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│   ┌──────────────┐                                          │
│   │   TRIGGER    │  ← User clicks button                    │
│   │  (Event)     │                                          │
│   └──────┬───────┘                                          │
│          │                                                   │
│          ▼                                                   │
│   ┌──────────────┐                                          │
│   │   ACTION 1   │  ← Validate form                         │
│   └──────┬───────┘                                          │
│          │                                                   │
│          ▼                                                   │
│   ┌──────────────┐                                          │
│   │   ACTION 2   │  ← Save data                             │
│   └──────┬───────┘                                          │
│          │                                                   │
│          ▼                                                   │
│   ┌──────────────┐                                          │
│   │   ACTION 3   │  ← Navigate to next page                 │
│   └──────────────┘                                          │
│                                                              │
└─────────────────────────────────────────────────────────────┘

Events (Triggers) ​

Events initiate workflows. Common events include:

User Interaction Events ​

EventDescription
ClickUser clicks on an element
SubmitForm is submitted
ChangeInput value changes
FocusElement gains focus
BlurElement loses focus

Page Events ​

EventDescription
Page LoadPage finishes loading
Page ExitUser leaves the page
ScrollUser scrolls the page

Data Events ​

EventDescription
Data LoadedData fetch completes
Data ChangedDatabase record updates
ErrorAn error occurs

Actions ​

Actions are what happen when an event triggers:

ActionDescription
Navigate to PageGo to another page
Open URLOpen external link
Go BackReturn to previous page
Open ModalDisplay a modal/popup

Data Actions ​

ActionDescription
Set VariableAssign a value to a variable
Save DataWrite to database
Fetch DataRetrieve data from source
CalculatePerform calculations

Visual Actions ​

ActionDescription
Show ElementMake element visible
Hide ElementMake element invisible
Change StyleModify element styling
Scroll ToScroll to an element

Tile Actions ​

ActionDescription
Clone TileCreate a copy of a tile
Delete TileRemove a tile
Refresh TileReload tile content

Variables ​

Variables store data that can be used throughout your application.

Variable Types ​

TypeDescriptionExample
TextString values"Hello World"
NumberNumeric values42, 3.14
BooleanTrue/false valuestrue
Date/TimeDate and time values2024-01-15
ObjectComplex data structures
ArrayLists of values[1, 2, 3]

Variable Scope ​

ScopeDescriptionLifetime
PageAvailable on current page onlyPage session
SessionAvailable across pagesBrowser session
UserTied to user accountUntil changed
GlobalShared across usersPersistent

Creating Variables ​

Step 1: Open Variables Panel ​

  1. Access the Variables section
  2. Click "Add Variable"

Step 2: Configure Variable ​

PropertyDescription
NameUnique identifier (no spaces)
TypeData type (text, number, etc.)
Default ValueInitial value
ScopeWhere variable is accessible

Step 3: Save ​

  1. Click Save
  2. Variable is now available for use

Using Variables ​

In Element Content ​

Reference variables in text:

Welcome, {userName}!
You have {notificationCount} new messages.

In Conditions ​

Use variables in conditional logic:

IF {userRole} equals "admin"
THEN Show admin panel
ELSE Hide admin panel

In Actions ​

Set or modify variable values:

Action: Set Variable
Variable: {totalPrice}
Value: {itemPrice} * {quantity}

Building Workflows ​

Example: Form Submission Workflow ​

Trigger: Submit Button Click

Actions:
1. Validate Form
   └─ Check required fields

2. IF Validation Passes
   ├─ Save Data to Database
   ├─ Set Variable: {submissionSuccess} = true
   └─ Navigate to Thank You Page

3. IF Validation Fails
   ├─ Set Variable: {submissionSuccess} = false
   └─ Show Error Message

Example: Dynamic Content Loading ​

Trigger: Page Load

Actions:
1. Fetch User Data
   └─ GET /api/user/{userId}

2. Set Variables
   ├─ {userName} = response.name
   ├─ {userEmail} = response.email
   └─ {userRole} = response.role

3. Show User Content Tile

Workflow Conditions ​

Add conditions to control action execution:

IF/ELSE Logic ​

IF {condition}
  THEN [Action A]
  ELSE [Action B]

AND/OR Logic ​

IF {condition1} AND {condition2}
  THEN [Action]

IF {condition1} OR {condition2}
  THEN [Action]

Common Workflow Patterns ​

Login Flow ​

Button Click → Validate Credentials →
IF Valid → Navigate to Dashboard
IF Invalid → Show Error Message

Data Submission ​

Submit Click → Validate Data → Save to Database →
Show Success Message → Reset Form

Dynamic Filtering ​

Dropdown Change → Set Filter Variable →
Refresh Data List → Display Results
Button Click → Open Modal →
Close Button Click → Close Modal

Best Practices ​

  1. Name variables clearly - Use descriptive names like userEmail not x

  2. Keep workflows focused - One purpose per workflow

  3. Handle errors - Always include error handling

  4. Test thoroughly - Verify all paths work correctly

  5. Document complex workflows - Keep notes on what each does

  6. Use appropriate scope - Don't use global scope unnecessarily

  7. Validate inputs - Check data before processing


Troubleshooting ​

Variable Not Updating ​

  • Verify the action is setting the correct variable
  • Check variable scope
  • Ensure the trigger is firing

Workflow Not Executing ​

  • Verify the trigger is configured correctly
  • Check condition logic
  • Look for errors in the console

Actions Not Running in Order ​

  • Verify action sequence
  • Check for async operations
  • Add appropriate delays if needed

Data Not Persisting ​

  • Verify save action is completing
  • Check database permissions
  • Review error messages

Questions? ​

If you have any questions, please don't hesitate to contact us. Alternatively, you can submit an issue on this platform.

Useful Links: ​

Website Builder - https://help.acenji.com/#/./create-web-application/website-builder/index Events Tab - https://help.acenji.com/#/./create-web-application/website-builder/floating-design-panel/element-section/events-tab/index Variable Center - https://help.acenji.com/#/./shared-concepts/variable-center/index

Was this article helpful? ​

No-Code App Builder