How do I copy a list of things as well as their relationships?

I have tables like:

Quote < Quote Locations < Quote Products

So 1 Quote can have 1 or more Quote Locations and 1 Quote Location can have 1 or more Quote Products, pretty straightforward.

How do I do a workflow that copies the current Quote to a new record, but then also copies all the Quote Locations to that new record, but then ALSO copies all the Quote Products as well? This is where I’m stuck.

I can do a workflow that says “Copy a list of things” and then I say “do a search for, quotes where unique_id = current page quote’s unique_id first item” and that works. I can then also do “Copy a list of things” and say “do a search for quote locations where quote = current pages quote” and that works.

I’m just stuck with the quote products. I can do “copy a list of things” but I don’t know how to relate the newly created products to their respective quote locations. A quote might have 3 quote locations, where location 1 has 3 products, location 2 has 5 products and location 3 has 1 product. I need all 9 products to duplicate, but be related to their respected quote location that was just created above.


I am also having this issue. I have created a decision tree that structures a questionnaire. There is a heirarchy of relations of lists and I am not sure how to duplicate a whole heirarchy at the time.

This would probably be a common issue for people, especially if you have a template data structure that you need to make copies of.

I am currently imagining having multiple list relationships and trying to recreate each of the old relationships in the new set of lists. This can get complicated quick, so any ideas or tips would be appreciated.

This should be simple though as in object oriented programming it is common to have data structures that are nested and every instance of an object would need to recreate those relationships.

I recently worked on something similar and for that I ran a custom workflow on a list of things.

Here are screenshots to give you an idea. In my case, I did an update (you would perhaps need to do create for the copy and use a relational identifier field to get the relationships right).

Essentially, you need to pass the relational identifiers in the right order and update the things after creation so that the relationships are maintained correctly.

web: n0c0de
twitter: @n0c0de1


I have this same situation, did you manage to solve it?