Hello everyone,
I’m new to Adalo and figured I’d build something simple to start learning. I chose to build an app that allows you to create a shopping list by selecting recipes you want to cook.
In my data base I have Collections for :
- Recipes
- Ingredients
Ingredients is a property of Recipe and Recipe is a property of Ingredients. An Recipes can have several Ingredients and an Ingredient can have several Recipes.
I have a screen that shows the list of Recipes with a “+” button to add it to your shopping list.
Now when you click on the “+” button there a 2 possibles ways I thought off :
- Creating a new record in a third Collection, called “Shopping List” for example, with the name of the ingredient and the quantity
- Updating the each Ingredient record of the Recipe to add the quantity needed, the Ingredient table could be our shopping list. This is actually probably a better way for doing what I want to.
Now, I didn’t manage to build any of these 2 possibilities. Because I don’t know how to access the Ingredients inside the recipe. As it is an array, Adalo only offers me to use the “Count” of the Ingredient property. What I would like to do is too loop through the array, and for each Ingredient, create or update a record.
I saw someone doing this by creating an intermediate screen. When you click on the recipe, it shows you the list of ingredients, then when you click on the button to add it to your shopping list, there is a timer and it loops through the list of ingredients and adds it to the shopping list.
Obviously that’s a very poor UX and I wouldn’t like to do that.
Is there an other way of doing what I want ?
Thanks a lot,
Johann