Advanced concepts
Order of operations for more than two conditions and mixed Boolean operators
Consider the following condition: We would like a text column called 'Conditional example field' to display when the Lease Type is 'New' and State (US) equals 'California' or 'New York'.
However, upon testing the condition, the behaviour does not match the business logic required. Instead, the 'Conditional example field' appears when Lease Type equals Renewal and State (US) equals New York.
The order of the conditions has grouped the three conditions based on the
AND
operator.
Expressed another way, this is our desired condition:
Lease Type is equal to New
AND
( State (US) is equal to California
OR
State (US) is equal to New York )
But this is the conditional behaviour we get:
( Lease Type is equal to New
AND
State (US) is equal to California )
OR
State (US) is equal to New York
Reversing the order won't produce the desired conditionality.
In this case, the boolean
AND
groups the second and third conditions together, as follows:
State (US) is equal to California OR (State (US) is equal to New York AND Lease Type is equal to New)
To achieve the desired conditionality, we must do the following:
In this case, we
repeat the 'Lease Type' condition
to ensure the conditional logic we are after is achieved:
(State (US) is equal to California
AND
Lease Type is equal to New)
OR
(State (US) is equal to New York
AND
Lease Type is equal to New)
How to combine multiple conditions with the 'is not equal to' operator
You may choose to use the 'is not equal to' operator if you have a choice column with dozens of value choices, and would like a column to appear for all of those options except one. For example, to display a column for all states in the US except Alaska, configure the conditional column as follows:
Display field when State (US)
is not equal to
Alaska
If you need to combine more than one of these 'negative' conditions, that is, multiple conditions where a column 'is not equal to' a value, you must choose the appropriate boolean connector to achieve the desired condition.
Consider the following scenario. You would like a conditional column to appear under all circumstances except for when the state selected is Alaska or Hawaii. You may initially configure the conditions as follows:
Display field when
State (US)
is not equal to
Alaska
State (US)
is not equal to
Hawaii
However, upon configuring this conditional column and testing it, you will discover that the conditional column appears no matter which state is selected, including Alaska or Hawaii. Combining
is not equal to
conditions with the
OR
operator is the equivalent of asking to display the column, except when the state is not equal to both Alaska and Hawaii, which is impossible given that this column is a single column.
Alternatively, to achieve the desired conditional behaviour, use the following configuration:
Display field when
State (US)
is not equal to
Alaska
State (US)
is not equal to
Hawaii
With this configuration, if either Alaska or Hawaii is selected, the column does not display. Under all other conditions, the column displays.