There is essentially one pattern demonstrated on Microsoft's official article about this topic:
Show or hide columns in a list or library form
Which is:
=if([$MyColumn] == 'Some Value', 'true', 'false')
We are trying to implement logic which includes AND()
, OR()
and NOT()
and different operators (eg: >=
, <>
, ==
).
None of these seem to be working.
For example:
=if(AND([$MyNumberColumn] >= 1, [$MyNumberColumn] < 3), 'true', 'false')
just displays the error:
Enter a valid condition
There is nothing in the Microsoft article that says these statements and operators are NOT supported, and they ARE supported in Calculated Columns, so I am at a loss as to whether there are errors in my formula OR the statements and operators I am trying to use to hide and show fields are just not supported.
Can anyone please provide an authoritative, definitive answer to the question:
What operators and statements are supported in Microsoft List conditional formulas to hide and show fields?
Try formula in below format:
AND: Use &&
=if([$MyNumberColumn] >= 1 && [$MyNumberColumn] < 3, 'true', 'false')
OR: Use ||
=if([$MyNumberColumn] >= 1 || [$MyNumberColumn] < 3, 'true', 'false')
NOT Equal: Use !=
=if([$MyNumberColumn] != 1, 'true', 'false')