Skip to content
ProcessIQ

Forms and data

Expressions reference: operators, functions and variables

The complete expression language used for branch conditions, Visible when, Required when and calculations, with every operator, function and variable.

Last updated

Expressions are short rules such as form.amount > 10000. ProcessIQ uses them in four places: branch conditions on a Condition step, Visible when, Required when and Calculation on form fields. Expressions have no side effects. They read values and return a result.

Variables

VariableMeaningWhere it works
form.<key>The answer to a form field, using its KeyEverywhere
vars.<name>A value kept from an API call under Keep from the answerBranch conditions
requester.name, requester.emailThe person who submitted the requestBranch conditions
requester.id, requester.departmentId, requester.branchIdInternal identifiers of the requester, their department and branchBranch conditions

Rules on form fields can use only form.<key>. A missing value is empty (null), not an error. You cannot reach inside a list by position.

Literals

  • Numbers: 10000, 0.075, -5. No thousands separators or exponents.
  • Text in single or double quotes: 'USD', "Finance". A backslash escapes the next character.
  • true, false and null.
  • Lists: ['Finance', 'Legal'].

Operators

From lowest to highest precedence:

OperatorMeaning
||or
&&and
!not. It applies to the whole comparison that follows it.
== != < <= > >= inComparison. Use one per expression part; chain with &&.
+ -Add and subtract. + joins text if either side is text.
* /Multiply and divide.
- (before a value)Negative.
( )Grouping.
  • == ignores letter case for text. 'usd' == 'USD' is true. Numbers compare as numbers, so form.amount == 100 works for a number field.
  • < and > compare numbers, or two pieces of text in plain character order. Other combinations are false.
  • in tests a list: form.department in ['Finance', 'Legal']. The right side must be a list, such as a literal or a Multi-select answer.
  • && and || treat values as true or false. Empty, null, false, 0, empty text and an empty list count as false. Everything else is true.
  • Arithmetic on a value that is not a number gives an empty result. Dividing by zero does not give a usable number, so guard against it.

Functions

FunctionReturns
len(x)The number of characters in text, or items in a list. Empty gives 0.
contains(x, y)For text, true if x includes y, ignoring case. For a list, true if x has an item equal to y.
lower(x)The text in lower case. Anything else gives empty.
isEmpty(x)True if x would count as false. Note that 0 and false count as empty.

These four are the only functions. There are no date functions, and no way to read today's date. A function name that does not exist fails when the rule runs, so check each rule with Simulate.

Examples that work

form.amount > 10000
form.amount > 10000 && form.currency == 'USD'
form.department in ['Finance', 'Legal']
!form.urgent
lower(form.country) == 'nigeria'
contains(form.reason, 'refund')
len(form.justification) > 50
isEmpty(form.notes)
form.quantity * form.unitPrice
(form.base + form.bonus) / 12
'Order ' + form.reference
form.amount >= 1000 && (form.type == 'capex' || form.type == 'project')
vars.orderId != null

Limits and checks

  • An expression can be up to 2000 characters.
  • Validation rejects syntax errors, roots other than form, vars and requester, and form fields that do not exist.
  • Simulate uses your sample answers, but has no API results and no requester details, so rules on vars and requester are not meaningful there.

The expressions are used in conditions and branching and conditional and calculated fields. Fields themselves are covered in form fields and validation. To write them with help, try describe a workflow with AI or the AI prompt guide.

Try ProcessIQ yourself

Start a free trial or open the shared demo organisation with a test account for every role.