Hey All! Appreciate the great community here.
I am following @MultiTech 's YouTube video “Looping with Actions (Do-While & For Loops in AppSheet) | BUILD VIDEO”
I find the solution to looping very elegant. I have attempted to follow the video to incorporate this into an app I am building for my girlfriends food selling business. I have everything working except that it only runs the loop once. I think I know why.
I am attempting to add a single row on my Orders table (these are the individual food items that she needs to make/deliver) for each Invoice Line Item that is a child to (a part of) Invoices. The common data from an Invoice (order date, client, source) are added to each new Table row, and then I add the first (using Index) Invoice Line Item to the Table row, then try to loop through using your method of list subtraction. The hope is that the Invoice is broken down into individual Order rows so that she can check them off as she makes or delivers them.
Because all of my loop actions reside on the Invoice table, the loop action sees only a single record on the Invoice table (even though there are multiple Invoice Line Items under that Invoice record ), even when I set the Reference Rows to the Related Invoice Line Items column that is auto populated on the Invoice table. I expected the list I referenced to be seen as the set of rows to have an action performed on it but it seems like the “Action on a set of rows” will not use a set of rows that is one level removed from the table that the action lives. Here are photos of my Reference Row and the resulting Table data.
Here is a photo of the Table data from the sample app demonstrated in the video where the “Action on a set of rows” would perform. I see clearly multiple rows that would then run the loop this many times.
Can I change my reference somehow to generate a list of rows based on the Invoice Line Items so that the loop would function that many times?
Make sense? I wonder of there is a way to reference the child set somehow rather than only the sets living on the Invoice table directly? Thanks for any response!
PS Here are my Invoice and Invoice Line Item data sets.




