"contrary" visibility rules not working?

When placing two icons in a container with “contrary” visibility rules, only one of them behaves as it should and I am really puzzled. What I am aiming for is one OR the other icon displaying if the conditions are met.

This formula works fine:
IF(IS_IN_ARRAY_BY_KEY(data.SymptomtagsColl, “tag”, repeated.current.tag), true, false) || IF(IS_IN_ARRAY_BY_KEY(data.SymptomtagsColl, “tag”, repeated.current.tag+" "), true, false)

But this one doesn’t:
IF(IS_IN_ARRAY_BY_KEY(data.SymptomtagsColl, “tag”, repeated.current.tag), false, true) || IF(IS_IN_ARRAY_BY_KEY(data.SymptomtagsColl, “tag”, repeated.current.tag+" "), false, true)

Only one icon per line can display according to the rules, but the blue ones with the second formula do not behave.

Any ideas?
Is there anything I am missing here?

Thanks in advance for your help!

The second formula that doesn’t work as expected has a slight logic problem. You evaluate the formula and want to return “false” value. That happens in the first part or the second part. But if it is false in the first IF(), then it is true in the other IF. And you connect the two conditions with the || logical “or” operator which returns true if any of the conditions evaluate to true.

Instead of trying to make the contrary condition this way, you could simply duplicate the first working formula and place it into parentheses after an exclamation mark, like this:


This would completely “negate” the result of the inner formula. So when your formula returns true for the check icon, it would return false for the + icon.

Hope this helps.

Great Mihaly, this works!

Do you know a good resource for all these kind of REGEX rules?

Thank you.

It has nothing to do with REGEX. These symbols are the logic operations of formula / javascirpt syntax.
Read more here:

Thank you Mihaly, very helpful!

1 Like