Formulas
The builder mode in variables and conditions covers most use cases. Formula mode gives you the full syntax for complex scenarios the builder can’t represent, or if you simply prefer a more hands-on, code-like workflow. This page is a reference for that syntax.
@ references
Type @ followed by a field or variable name to use its value in a formula. See @ References for details.
@price * @quantity
@name = "Alice"
Arithmetic
| Operator | Meaning |
|---|---|
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division (dividing by zero returns 0) |
Use parentheses to control order of operations:
(@price + @tax) * @quantity
Comparisons
| Operator | Meaning |
|---|---|
= | Equals |
!= | Does not equal |
> | Greater than |
< | Less than |
>= | Greater than or equal |
<= | Less than or equal |
Text comparisons are case-insensitive — @name = "Alice" matches “alice”, “ALICE”, etc.
Logic
| Operator | Meaning |
|---|---|
AND | Both sides must be true |
OR | At least one side must be true |
NOT | Negates the following condition |
@age >= 18 AND @country = "US"
@role = "Manager" OR @role = "Director"
NOT @email = EMPTY
You can also write && instead of AND and || instead of OR.
Functions
COUNT
Counts the number of selected options in a multiple choice field.
COUNT(@interests)
COUNT(@interests) > 3
MAX, MIN, AVG
Calculate across multiple numeric fields or variables.
MAX(@score_a, @score_b, @score_c)
MIN(@q1, @q2) >= 3
AVG(@q1, @q2, @q3)
CONTAINS
Checks whether a field contains a value. For text fields, checks if the text includes a substring. For multiple choice fields, checks if an option is selected.
CONTAINS(@email, "gmail")
CONTAINS(@interests, "Design")
CONTAINS(@interests, "Design", "Engineering")
When multiple values are given, all must be present. Related variants:
| Function | Meaning |
|---|---|
CONTAINS | All values must be present |
CONTAINS_ANY | At least one value must be present |
CONTAINS_NONE | None of the values may be present |
CONTAINS_EXACTLY | Field contains exactly these values and no others |
All CONTAINS functions are case-insensitive for text.
Special values
| Value | Meaning |
|---|---|
EMPTY | Field has no value (also: NULL) |
TRUE | Boolean true |
FALSE | Boolean false |
@email != EMPTY
@agreed = TRUE
All special values are case-insensitive.
Strings
Wrap text in double quotes:
@name = "Alice"
CONTAINS(@bio, "engineer")
Use \" to include a literal quote: "She said \"hello\"".
Text templates
In variables and inline calculations, if a formula contains plain text mixed with @ references, it’s treated as a text template — the references are replaced with their values:
Hello @name, welcome!
Your score is @score out of @total
To compute values inside text, use an inline calculation.
Operator precedence
From tightest to loosest binding:
| Precedence | Operators |
|---|---|
| 1 (tightest) | () parentheses, function calls |
| 2 | NOT |
| 3 | * / |
| 4 | + - |
| 5 | = != > < >= <= |
| 6 | AND |
| 7 (loosest) | OR |
When in doubt, use parentheses to make the order explicit.