Back to App

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

How it works: When SET_VAR executes, it takes the current text (CurrentText) and saves it under a name you specify. Later, GET_VAR can load that value back.

How to use

  1. Drag SET_VAR from the Variables section of the command palette
  2. Drop it into your flow section
  3. A popup asks for a variable name — type a meaningful name like "invoiceNo" or "totalAmount"
  4. Before this command, ensure CurrentText has the value you want to store (usually via TYPE COLUMN DATA)

Example

Commands: 1. TYPE COLUMN DATA (Invoice No) ← CurrentText = "INV-001" 2. SET_VAR: "refNo" ← Stores "INV-001" in variable "refNo" // Later in the flow... 3. GET_VAR: "refNo" ← CurrentText = "INV-001" again 4. TYPE TEXT WITH PARAMETER: "/" ← CurrentText = "INV-001/" 5. GET_VAR: "refNo" ← CurrentText = "INV-001/INV-001"

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

Practical Example: Building a Reference String

Goal: Create "INV-001/15062026" from separate Invoice No and Date columns Middle Commands: 1. TYPE COLUMN DATA (Invoice No) ← CurrentText = "INV-001" 2. SET_VAR: "invNo" ← Variable "invNo" = "INV-001" 3. TYPE COLUMN DATA (Date) ← CurrentText = "15/06/2026" 4. REMOVE SPECIAL CHARACTERS ← CurrentText = "15062026" 5. SET_VAR: "cleanDate" ← Variable "cleanDate" = "15062026" 6. GET_VAR: "invNo" ← CurrentText = "INV-001" 7. TYPE TEXT WITH PARAMETER: "/" ← CurrentText = "INV-001/" 8. GET_VAR: "cleanDate" ← CurrentText = "INV-001/15062026" 9. COPY COLUMN DATA (ignored — just for example) 10. PASTE ← Pastes "INV-001/15062026"

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

  1. Drag IF from the Conditional section
  2. A popup appears with 3 fields: Left value, Operator, Right value
  3. Fill in the condition
  4. Add commands that should run when the condition is TRUE
  5. Optionally add ELSEIF / ELSE for alternative branches
  6. End with ENDIF

Available Operators

OperatorWhat it checksData type
equalLeft equals Right exactlyString or Number
not equalLeft does NOT equal RightString or Number
greater thanLeft is greater than RightNumber
less thanLeft is less than RightNumber
greater than or equalLeft >= RightNumber
less than or equalLeft <= RightNumber
containsLeft contains Right (case-insensitive)String
starts withLeft starts with Right (case-insensitive)String
ends withLeft ends with Right (case-insensitive)String
is emptyLeft has no content (whitespace only counts as empty)Any
is not emptyLeft has contentAny
is numericLeft is a valid numberNumber
is not numericLeft is NOT a valid numberNumber

Value Sources

Both left and right values can come from:

Full IF/ELSE Example

Scenario: If the invoice amount is more than 10,000, flag it as "HIGH VALUE" Middle Commands: 1. TYPE COLUMN DATA (Amount) ← CurrentText = "23,100" 2. SET_VAR: "amount" ← Variable "amount" = "23,100" 3. IF: {Current} greater than "10000" → TYPE TEXT WITH PARAMETER: "HIGH VALUE" ELSE → TYPE TEXT WITH PARAMETER: "NORMAL" ENDIF 4. ENTER // Row with amount "8,750": // Step 2: amount = "8,750" // Step 3: "8,750" > "10000"? → FALSE → Types "NORMAL" // Row with amount "23,100": // Step 2: amount = "23,100" // Step 3: "23,100" > "10000"? → TRUE → Types "HIGH VALUE"

ELSEIF Example — Multiple Conditions

Scenario: Categorize invoices by amount range Middle Commands: 1. TYPE COLUMN DATA (Amount) 2. SET_VAR: "amt" 3. IF: {Current} greater than "50000" → TYPE TEXT WITH PARAMETER: "LARGE" ELSEIF: {Current} greater than "10000" → TYPE TEXT WITH PARAMETER: "MEDIUM" ELSEIF: {Current} greater than "1000" → TYPE TEXT WITH PARAMETER: "SMALL" ELSE → TYPE TEXT WITH PARAMETER: "MICRO" ENDIF 4. ENTER

Arithmetic Functions

Perform math operations on values. The result becomes the new CurrentText.

Supported Operations

OperatorNameExample
+Addition500 + 100 = 600
-Subtraction500 - 100 = 400
*Multiplication500 * 2 = 1000
/Division500 / 2 = 250
%Percentage500 % 10 = 50 (500 * 10 / 100)

Value Sources

Example: Calculate Total with Tax

Middle Commands: 1. TYPE COLUMN DATA (Amount) ← CurrentText = "10000" 2. SET_VAR: "baseAmount" ← Variable "baseAmount" = "10000" 3. ARITHMETIC: {Current} * 18 ← CurrentText = "180000" (18% of 10000) 4. ARITHMETIC: {Current} / 100 ← CurrentText = "1800" (tax amount) 5. SET_VAR: "tax" ← Variable "tax" = "1800" 6. GET_VAR: "baseAmount" ← CurrentText = "10000" 7. ARITHMETIC: {Current} + {tax} ← CurrentText = "11800" (total with tax) 8. COPY COLUMN DATA → PASTE ← Types "11800" into the field
Tip: For percentage calculations, the % 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:

Scenario: Process invoices, apply discount for VIP customers, calculate final amount Middle Commands: // Store values 1. TYPE COLUMN DATA (Amount) 2. SET_VAR: "amount" 3. TYPE COLUMN DATA (Customer Type) 4. SET_VAR: "custType" // Apply discount logic 5. IF: {Current} equal "VIP" 6. GET_VAR: "amount" 7. ARITHMETIC: {Current} * 10 8. ARITHMETIC: {Current} / 100 9. SET_VAR: "discount" 10. GET_VAR: "amount" 11. ARITHMETIC: {Current} - {discount} 12. SET_VAR: "finalAmount" ELSE 13. GET_VAR: "amount" 14. SET_VAR: "finalAmount" ENDIF // Type the final amount 15. GET_VAR: "finalAmount" 16. COPY COLUMN DATA → PASTE into target field 17. ENTER
Ready to build? Go to the Flow Editor and start creating your flow, or record one to get started quickly.