How to write IF/THEN conditional logic in Layer formulas, including AND/OR operators, nested IFs, and the IFS function.

Mike Lee
Thursday, May 7, 2026
Layer formula fields support conditional logic through the IF function. IF returns one value when a condition is true and another when it is false. This article covers the basic syntax, the comparison functions used to build conditions, and how to express multi-branch logic through nested IF statements.
Basic syntax
All three arguments are required. To leave the false branch empty, pass an empty string.
This returns "Ready" when the Status field equals "Approved" and a blank value otherwise.
Building conditions
The condition argument is a boolean expression. Layer formula v2 builds conditions through dedicated comparison functions rather than infix operators such as = or <. The comparison functions used most often inside IF are listed below.
Function | Description |
|---|---|
| TRUE when both values are equal and of the same type |
| TRUE when the values are different |
| TRUE when value1 is greater than value2 |
| TRUE when value1 is greater than or equal to value2 |
| TRUE when value1 is less than value2 |
| TRUE when value1 is less than or equal to value2 |
| TRUE when date1 is earlier than date2 |
| TRUE when date1 is later than date2 |
| TRUE when both dates are identical |
EQUALS is strict on type. EQUALS("5", 5) returns FALSE because the first value is a string and the second is a number.
Examples
Flag an element as overdue when its due date has passed.
Return a status label based on a numeric threshold.
Compare two fields rather than a field and a constant.
Multiple conditions
Layer formula v2 expresses multiple conditions through nested IF statements. Use the true or false slot of the outer IF to host an inner IF.
Both conditions must be true
To require two conditions, nest the second IF inside the true branch of the first. The outer condition is checked first, and the inner condition is only checked when the outer one is true.
This returns "Overdue" only when the due date has passed and the status is not "Closed".
Either condition can be true
To accept either of two conditions, nest the second IF inside the false branch of the first. The outer condition runs first, and the inner condition gets a chance to return the value when the outer one is false.
This returns "Escalate" when the priority is either "Critical" or "High".
Three or more outcomes
Continue nesting IF statements to handle more than two outcomes.
The branches evaluate in order. The first condition that returns true determines the output.
Things to know
Comparison functions are case-sensitive and type-strict. EQUALS({Status}, "approved") will not match a Status value of "Approved". Match the exact capitalisation of the option name. EQUALS({Quantity}, "5") will not match the number 5. Use number comparisons for number fields.
There is no IFS, IFERROR, or ISBLANK function in Layer formula v2. Use nested IF for multi-branch logic. To handle a possibly empty field, compare it explicitly: IF(EQUALS({Field}, ""), "default", {Field}).
Nesting depth. Deeply nested IF chains become hard to read past three or four levels. If you find yourself nesting heavily, consider whether the value belongs in a Lookup field with an aggregation, or whether it can be set on the element directly through an Automation.
Field references in the visual editor. Conditions in the visual formula editor are built by inserting comparison functions and dragging fields into the parameter slots. The {Field Name} notation in the examples above is shorthand for communicating structure in writing.

