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)
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:
!(IF(IS_IN_ARRAY....))||IF(IS_IN_ARRAY....)))
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.