Strugling to add Multiple locations

Hi guys,
been struggling to add multiple locations to an Order. Here’s my db setup. i have an Order. with Number, date, user, and so forth. I’m trying to add Pickup and Delivery locations, however, it can be multiple Pickups and multiple Delivery locations. lets say a Location has couple fields - Facility Name, Address, Type which is an Option Set Pickup / delivery and Date. So the Order will have a field Location which is a list of Locations. or should i put it just as location and not list, little confused.
image

Right now under the input fields for location i have a RG that would list these locations, however i’m strugling to create the custom states to display them. i created 3 custom states for each field, but i’m not sure how to set the data type of the repeating group to display all custom states combined into one row, if that makes sense?
What i’m trying to achieve here is to create these locations together with the order at the same time.
Any help appreciated.

Order needs a list field of Locations

Location needs an Order field

Then your “Add” button creates a new Location, set the Order field to the relevant one, then Make changes to a thing and change the Order, and add the Result of step 1 to the Locations list field

Repeating group datasource can just be the Order’s Locations

Thanks for your reply Tyler, i tried that however, here’s the thing. At this point the Order is not created yet. so how would i know which Order to set it to to be able to make the change? I called it Load in this case instead of Order to test it out on a different data thing. In the end the RG is not populating when i’m saving the location.


the frontend

the workflows

Yea that would be an issue…

I like to start the Order first thing and they are literally building their order as they go along. Then when they place the order you just change a status field to “Order placed”

This topic was automatically closed after 70 days. New replies are no longer allowed.