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

OperatorMeaning
+Addition
-Subtraction
*Multiplication
/Division (dividing by zero returns 0)

Use parentheses to control order of operations:

(@price + @tax) * @quantity

Comparisons

OperatorMeaning
=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

OperatorMeaning
ANDBoth sides must be true
ORAt least one side must be true
NOTNegates 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:

FunctionMeaning
CONTAINSAll values must be present
CONTAINS_ANYAt least one value must be present
CONTAINS_NONENone of the values may be present
CONTAINS_EXACTLYField contains exactly these values and no others

All CONTAINS functions are case-insensitive for text.

Special values

ValueMeaning
EMPTYField has no value (also: NULL)
TRUEBoolean true
FALSEBoolean 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:

PrecedenceOperators
1 (tightest)() parentheses, function calls
2NOT
3* /
4+ -
5= != > < >= <=
6AND
7 (loosest)OR

When in doubt, use parentheses to make the order explicit.