Data problem, looping through a list

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,

Hi @jarias,

Unfortunately, Adalo doesn’t support bulk operations with several records in a collection, and this is what you want (create several records in Shopping List based on Ingredients).

There are 2 possible workarounds for this.

First one is to use countdown timers (what you call “a very poor UX”). To improve it you can have a list of Ingredients with countdown in a modal, and add them immediately, showing some kind of “checked” icon when ingredient is added.

Another one is to use 3rd party tools to add records to Adalo Collections DB. For example, you can use Integromat/Make to create a scenario which adds several records at once.


1 Like

Thanks for your answer @Victor , I’ll look into that !

1 Like