Template
Looping with Actions (MV)
How to loop through a list, and create child records for each item in that list
Industry:
n/a
The purpose of this app is to demonstrate how you can loop through lists without the need of an iterator - or some other way of manually keeping track of what needs to be done, or the count of how many are left.
Loading...
Also see:
tablet mode & fullscreen mode
How we built this app
This app features 4 (relevant) tables:
- Products (to serve as a basic supporting data table)
- Orders (the parent)
- Order_Details (the child)
- Order_Detail_Fullfillment (the grandchild)
Inside the order, you select a number of products - it is this column that creates the list of items that need to be created.
Inside the order table, there are additional Virtual Columns that extract from the [Related Order_Details] column a list of the products that have been created; we then take the original list of items and subtract this list of items created, giving us a list of what's left and still needs to be created.
Actions then run a loop over this list of items, creating one child record for each item in that list.
Additionally, this app also creates associated grandchild records after the loop has been completed.
~~|~~
This app also demonstrates how to maintain the list of child records in the opposite direction: when you remove something from the list, there is a Ref action that runs an Auto-delete action over the records that match the product(s) you removed from the list.
This is a preview of the data sets used in the app.
Data
This is a high-level model of both the data entities and the UI elements in the app.
Loading...