Updating in-app filtering logic?

Hi all,

I have two tables with entities that have a many-to-many relationship with one another. For simplicity, let’s assume one table is ingredients, and another table is foods made from those ingredients. For example, assume we have the ingredient “flour” which has a relationship to foods “bread, cookies, cake” and we have another ingredient “yeast” which has a relationship to foods “bread, beer”.

When I turn on in-app filtering right now it treats each combination of “foods” as a unique filter option. For example, filter options are “bread, cookies, cake” and “bread, beer”.

Instead, I’d love to update the filter options to only show unique “foods” i.e. “bread”, or “cookies” or “cake” or “beer”. When a user selects a food in the filter, it would show any ingredients that are associated with that food, regardless of whether or not it’s ONLY associated with that food, or if it’s also associated with other foods. Essentially treating the filter as “foods contains XYZ”. So, a user could select “bread” in the filter and receive “flour” and “yeast” back as results.

Is there a way to make this happen?

Thank you

I think you can do it like this:

  • On top of the relationship you make from Ingredients to Tables, create a lookup to return all Food made from Ingredients. You will get an array of Food names.

  • Use that array as your filter.

1 Like

That worked! Thank you!!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.