AnsweredAssumed Answered

Conditionally format an object if a field contains partial text

Question asked by davidcom on Dec 20, 2018
Latest reply on Dec 22, 2018 by davidcom

A bit of a newbie here.

 

I have a field (I'll call it "Food") with values which are added via a checkbox set. So the Food field may contain, for example:

 

Apple

Red

Fruit

 

I then have a popover button that I would like to conditionally format. I'd like the button to turn red if the Food field contains "Apple".

 

In layout mode, when I select the button and choose Format -> Conditional, I am prompted to enter a forumula. But I'm not sure what my formula should be.

 

I tried this simple calculation: Table::Food = "Apple"

 

When only Apple is check-marked, the conditional formatting works (the button turns red). But if both Apple and Red are check-marked, the button doesn't turn red (I imagine this is because my calculation is looking for only "Apple").

 

Is there a formula that will turn the object red if the field contains an instance of "Apple" (even though it may contain other words)?

 

Thank you.

Outcomes