Create a Custom State:
Select the page (or a reusable element) where your form resides.
Add a custom state (e.g., tempProductList).
Set its type to Product List (if you created a separate data type) or list of texts/objects based on how you’re structuring the products.
Set it as a list (check the “This is a list” option).
Set the Repeating Group Source:
Change the data source of your RG to the custom state tempProductList.
Add Items Dynamically:
When the user fills out the fields for a product and clicks an “Add” button:
Use a workflow to:
Add the new product details to the tempProductList state.
This would look something like:
Set State → tempProductList →
tempProductList :plus item →
[Create a temporary product object].
Save the Order and Associated Products:
When the user submits the form:
Save the Order entry first.
Loop through the items in the tempProductList and save them to the Product List data type, linking them to the created Order.
Reset the Form:
After saving the order and product list, clear the tempProductList state and reset the input fields to prepare for a new order.