Variables & Conditions
Add dynamic logic to your flows — store values, make decisions based on data, and perform calculations.
Variables
Variables let you store a value during flow execution and retrieve it later. This is useful when you need to reuse a value that was extracted or calculated earlier in the flow.
SET_VAR — Storing a Value
CurrentText) and saves it under a name you specify. Later, GET_VAR can load that value back.
How to use
- Drag
SET_VARfrom the Variables section of the command palette - Drop it into your flow section
- A popup asks for a variable name — type a meaningful name like "invoiceNo" or "totalAmount"
- Before this command, ensure
CurrentTexthas the value you want to store (usually viaTYPE COLUMN DATA)
Example
GET_VAR — Retrieving a Value
Retrieves a previously stored variable's value and loads it into CurrentText.
Enter the same variable name you used with SET_VAR.
Variable Scope
- Variables are per-row — each row in the Middle section starts with fresh, empty variables
- Variables set in one command are available to all subsequent commands in the same row
- Variables do NOT carry over between rows
- You can have multiple variables simultaneously (e.g., "refNo", "totalAmount", "partyName")
Practical Example: Building a Reference String
Conditional Logic (IF/ELSE)
Conditional commands let your flow make decisions based on data values. Instead of always doing the same thing, the flow can branch: "If the amount is greater than 10000, do X, otherwise do Y."
IF — Checking a Condition
How to use
- Drag
IFfrom the Conditional section - A popup appears with 3 fields: Left value, Operator, Right value
- Fill in the condition
- Add commands that should run when the condition is TRUE
- Optionally add ELSEIF / ELSE for alternative branches
- End with
ENDIF
Available Operators
| Operator | What it checks | Data type |
|---|---|---|
equal | Left equals Right exactly | String or Number |
not equal | Left does NOT equal Right | String or Number |
greater than | Left is greater than Right | Number |
less than | Left is less than Right | Number |
greater than or equal | Left >= Right | Number |
less than or equal | Left <= Right | Number |
contains | Left contains Right (case-insensitive) | String |
starts with | Left starts with Right (case-insensitive) | String |
ends with | Left ends with Right (case-insensitive) | String |
is empty | Left has no content (whitespace only counts as empty) | Any |
is not empty | Left has content | Any |
is numeric | Left is a valid number | Number |
is not numeric | Left is NOT a valid number | Number |
Value Sources
Both left and right values can come from:
{Current}— the current text (most common for the left side)- A variable name — references a previously SET_VAR value
- A literal value — any text or number you type directly
Full IF/ELSE Example
ELSEIF Example — Multiple Conditions
Arithmetic Functions
Perform math operations on values. The result becomes the new CurrentText.
Supported Operations
| Operator | Name | Example |
|---|---|---|
+ | Addition | 500 + 100 = 600 |
- | Subtraction | 500 - 100 = 400 |
* | Multiplication | 500 * 2 = 1000 |
/ | Division | 500 / 2 = 250 |
% | Percentage | 500 % 10 = 50 (500 * 10 / 100) |
Value Sources
{Current}— uses the current text as a number- A variable name — uses the stored variable value
- A number — any numeric value you type directly
Example: Calculate Total with Tax
% operator computes
left * right / 100. So 10000 % 18 = 1800 (18% of 10000).
Combining Variables, Conditions, and Arithmetic
The real power comes from combining these features. Here's a practical example: