Duplicate record --> duplicate linked fields automation?

Topic Labels: Formulas
1886 2
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast

Apologies for the unclear topic.

I have a recipe database, where I have tables for
• recipes
• ingredients
• recipe-ingredient junction, where I store data of e.g. amounts in recipes

I just realised i will need to easily make different versions of basically the same recipe where the new recipe version has slightly varying ingredients. Say a “Cheeseburger with fries v1” record where the bread ingredient is white bread of brand A, then a “Cheeseburger with fries v2” with white bread brand B as one ingredients. Otherwise same instructions and ingredients.

Perfect workflow for my users here would be to take the “Cheeseburger with fries v1” record in the recipe table, right-click -> duplicate record, get a new record with all the ingredients ready there, which they can start editing.

BUT! When simply duplicating the recipe record, the duplicate record, of course, has links to the same ingredients in the junction table as v1 has (the same ingredients now link to both v1 and v2). Editing these will affect the ingredients in “Hamburgers with fries v1” too, not nice. This is standard purpose basic behavior but not purposeful in my case. So,

Is there a way to do this: When duplicating a record in one table (here recipes) --> duplicate all records that are linked in one of its fields (here recipe-ingredient junction records), and make duplicates of all these in the junction table, so that the duplicate record in the recipe table has links to newly duplicate records of the ingredients in the recipe-ingredients table??

2 Replies 2
6 - Interface Innovator
6 - Interface Innovator

Hi! So I think I understand your problem and the easy answer is no, there is no simple way to do what you’re asking. I can think of some possible workarounds that will likely involve Zapier, though I think I’d need to see how the base is structured to make a good recommendation. If you want to share a link to what you’ve got (or a copy with any sensitive data removed) I’d be happy to take a quick look.

But I’m confused as to why you want to do this in the first place, and that makes me wonder if there’s a structural change to the base that could solve this problem. Here’s where I’m confused.
Using the two cheeseburger recipe example you gave, only the bread changes. You said that all the other ingredients and instructions stay the same. So, why are people editing the other ingredients and instructions in the first place? I’m sure there’s a reason for it, but I feel like I’m missing a detail I need to understand what that reason is. If the goal is just to make a copy of the record, remove the link to the v1 one bread, and add a link to the v2 bread, then what editing is happening to the other ingredients? I feel like either things are not linked up in the right way, in which case this has an easy solution, or I’m misunderstanding why linked “non-bread ingredient” records need to be edited when you start off by saying that they don’t (in which case I’m probably just misunderstanding what you meant).

If I understand the goal better and there’s a solution here I think I’ll know what it is. But right now it’s hard to suggest because I’m having trouble grasping the problem. So, let me know about that and I’ll try to help! :slightly_smiling_face:

5 - Automation Enthusiast
5 - Automation Enthusiast

Jumping in here to see if my example will make a difference.

I have a table called Events and in it is a record called Monopoly Tournament
I have a table called Users and in it is a bunch of people that come to events
I have a table called Registrants and in it is a field for 2 things … 1) single linked event 2) single linked user (thus, there are multiple records for users who are coming to the Monopoly Tournament)

I have lots of registrants already coming and they want to have the same event the next week.

Is there a way to …

  1. Easily duplicate the “Monopoly Tournament” record in the Event Table
  2. Automatically duplicate the registrants for the original event but change the event field value to the newly created event