Operators
Look up the operators Dynamic Expressions support for arithmetic, comparisons, logic and conditional results, the order they run in and fallback values.
Operators are symbols that tell a Dynamic Expression how to calculate, compare values, or apply logic. In plain text, use them inside {{ }} to work out a result, such as {{ 12 * 3 }} for 36. This reference shows what each operator does, which runs first, and how to handle errors.
Calculate with arithmetic operators
Operator | What it does |
|---|---|
| Multiplies numbers. |
| Raises the number on the left to the power of the number on the right. |
| Divides the number on the left by the number on the right. |
| Returns the remainder after division. |
| Adds numbers or joins text. |
| Subtracts the number on the right from the number on the left. |
All arithmetic operators except + require numbers on both sides.
Compare values
Operator | What it checks |
|---|---|
| The number on the left is greater than the one on the right. |
| The number on the left is greater than or equal to the one on the right. |
| The number on the left is less than the one on the right. |
| The number on the left is less than or equal to the one on the right. |
| The values are strictly equal. |
| The values are strictly unequal. |
The short and long spellings behave alike: == works like ===, and != works like !==.
Combine or reverse conditions
&&(AND) checks whether both conditions are true.||(OR) checks whether at least one condition is true.!(NOT) reverses the condition that follows it.
&& and || always evaluate both sides. An invalid expression on the right can raise an error even when the left side determines the result.
Choose a result with a condition
Use condition ? whenTrue : whenFalse to choose between two results. If the condition is true or counts as true, the expression returns whenTrue. Otherwise, it returns whenFalse.
Only the chosen branch is evaluated. For example, {{ 2 > 1 ? 10 : 1 / 0 }} returns 10 without attempting to divide by zero.
Check the order of operations
Dynamic Expressions use this order, from highest to lowest:
- Function calls and property access
- Prefix operators that act on one value:
!,-,+ - Multiplication, powers, division, and remainder:
*,**,/,% - Addition and subtraction:
+,- - Numeric comparisons:
>,>=,<,<= - Strict equality and inequality:
==,===,!=,!== - AND:
&& - OR:
|| - Conditional:
condition ? whenTrue : whenFalse
Operators that take two values group from left to right when they share the same priority. That includes chained ** operators.
Use parentheses to override this order. For example, {{ (2 + 3) * 4 }} returns 20, while {{ 2 + 3 * 4 }} returns 14.
Provide a fallback value
Dividing by zero raises an evaluation error. Use IFERROR(expression, fallback) to return a fallback when the expression raises an error. For example, {{ IFERROR(1 / 0, 0) }} returns 0.
Use IFEMPTY(expression, fallback) when you also want the fallback for an empty result. It returns the fallback when the expression raises an error or produces an empty value.
Common questions
Does IFEMPTY treat zero as an empty value?
No, IFEMPTY keeps 0 and false instead of returning the fallback. It uses the fallback for values like blank text or an empty list; see Functions for more.
How do I use a comparison to decide whether an automation continues?
Add a Condition after the trigger to check whether a value meets your comparison. If it doesn’t match, the run stops there, or only the current branch or iteration stops; see Conditions.
Where can I see why an expression failed during an automation run?
Check the recorded steps for the failed run in Runs. In the Automation editor, select the run counter, then select the run to inspect its steps; see Runs and Troubleshooting.