duplicate row from 3 different tables with new unique ID

Hello everyone I would like to ask you if it is possible and how you would create an action to duplicate a fertilization plan.

I have 3 tables referenced to each other
RIGHE INTERVENTI
is a part of
INTERVENTI
that is a part of
PIANI.

in RIGHE INTERVENTI there are [IDINTERVENTO] and [IDPIANO] columns

in INTERVENTI there is [IDPIANO] column

I would like to create an action that from the PIANI table allows you to duplicate on the respective tables all the rows of the 3 tables with the same [PLAN ID] by assigning new unique IDs. (both [PLAN ID] and [INTERVENTION ID] and [LINE ID]

I guess they are a series of actions but I would like some advice on how to develop it. The ideal would be for the duplication to open the PIANO form with the [IDCLIENTE] field empty.

these are the tables

2022-07-15 15_38_11-Window.png

 

2022-07-15 15_38_43-Window.png

 

2022-07-15 15_39_05-Window.png

 

0 4 89
4 REPLIES 4

Hi @bolognesiedalla ,

Great question! Instead of creating an action to populate these records could you have users fill out the form on the table you are wanting all of these records to populate on? That way on form save the records populate on all of theses tables. You can use Primary and Foreign Keys to setup these data relationships. Would you like more information on how to set this up or want to try to create this feature with actions?

Thanks,

Austin from AppSheet Training

Hi Austin.
can you give me some indication of your idea? thank you very much

Hi @bolognesiedalla , 

I would recommend having a join table that captures all of the relevant fields you are looking for and then when records are added to this table they are duplicated to the other three tables via an automation. 

Ex: 

You will need to create an automation that will add new rows to the tables you mentioned above. 

bot 3.PNG

This should get you started. Let me know if you have any questions. 

Thanks!

Austin from AppSheet Training

hello thanks for the help !! I didn't quite understand what you mean as 1st solution (perhaps due to my poor English). can you give me an example? in practice, the user must copy a model and modify it if necessary for his customer. the 3 tables are in reality a single entity thus constructed due to the large number of variables and joints that compose it.

Top Labels in this Space