Filter and display items based on a full match of user-owned ingredients

Hi everyone,

I’m currently building an app in Adalo where users can input the ingredients they have, and the app should display only the recipes that can be made with all of those ingredients. I’m struggling to implement the functionality where the app filters and shows only the drinks that require ingredients entirely available in the user’s list.

To clarify, I need the app to:

  1. Compare the list of ingredients for each recipe with the ingredients the user owns.
  2. Display the meal only if the user has all the required ingredients for that meal.

I’ve set up collections for recipes, ingredients, and user-owned ingredients, but I’m unsure how to set up the filtering logic to achieve this. Is this something that is possible in Adalo? If so, could you guide me through how to implement it?

Any advice or example setups would be greatly appreciated!

Thank you in advance!

Hi @ArthurBrum

In order to achieve this, you need to create a database of ingredients that can be accessed by both you and your customers. Customers should select ingredients from your database rather than adding their own. This will ensure that customers can choose ingredients that exist in both databases and add them to their own list. Utilizing many-to-many relationships will be helpful in this process. It will allow you to retrieve recipes based on the ingredients customers have. Keep in mind that ingredients should be accessible in recipe collections using a many-to-many relationship.

Thanks
Shantanu

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