Insert multiple rows based on findrow-condition

Dear,

I made a small shopping list app. Now I would like to add the folowing feature: add a menu to the shopping list. This should add all articles linked to the menu to the shopping list.

I would do the with the 'insert row' automation and the findrow() function. However this return/can add only 1 row (in example, 1 article of the menu) to the shopping list?

Any suggestions how to solve ?

Kind regards,
Mark

Hi @Mark-1c16 welcome to the community! :wave: It's great to hear you are building out a shopping list app :shopping:

If you’d like to add all items to the shopping table that are linked to a selected menu category, you can use the ‘Add row to’ automation with ‘Run the step for theses rows’

In my example workbook, I created a table named ‘Shopping_Item_Category’ that will act as my menu in app that users can select:
image (51)

I also have a ‘Shopping_Items’ table that is rowlinked to my ‘Shopping_Item_Category’ table:

I have a ‘Shopping_List’ table that has shopping list names my users can select and add items to:
image (53)

Lastly, I have a ‘Shopping_List_Items’ table that contains a row for each item that is added to a Shopping List. This is the table I’ll be adding rows to:
image (54)

For my example app set up, I have a screen where users can select a ‘Category’ and ‘Shopping List’:

For the piece that you are looking for, I created a button that will add all items linked to the category selected and write it to my ‘Shopping_List_Items’ table. To set this up I created an automation ‘Add row to’ and set a filter for ‘Run the steps for these rows’ . What this will do is run the automation for the items that match the category selected in app:

The last pieces in the automation is to specify where to add rows to and what to add. Here I specified to take data from ‘Shopping_Items’ table (Note: because of ‘Run the step for these rows’ it will filter down to the correct items) and write to my ‘Shopping_List_Item’ table:

Then I specified to write the shopping list name as well:

Here is the app in action:

Let me know if this helps! Happy Building :hammer_and_wrench:

Great. Thanks for the help. It worked fine for me!

3 Likes

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