Allergen Warning visibility is always showing (User Profile vs. Item)

Hi everyone, I’m building a school nutrition app and I’m stuck on a logic issue.

I want to show a warning component (text/image) on a Food Item’s details screen ONLY IF the food contains an allergen that the current user has selected in their User Profile.

Right now, the warning is showing up for every single food item that has allergens listed, regardless of whether the user has that allergen selected or not.

How should I set up the Visibility Condition or If-Then-Else column to detect if there is a “match” between the two lists? Currently, it seems to think everything is a match.

Any screenshots or advice on how to fix this would be amazing. I have posted screenshots to show my database and the problem i’m having. If you have any questions feel free to ask!










Thanks!

Make sure you have an array of allergens in the Foods table for each food item. Create a relation linking that food allergen array to the array you already have in the user profile. Show the warning if the relation is not empty. That should be it. You don’t need the Single Value, IF, or Rollup columns.

1 Like

In chart form.

1 Like