Create a copy of a group of entities

Hi all, 

I have this structure:

Analysis, with many risks, with many actions, example:

Analysis

Analysis IDAnalysis Name
1TestAnalysis

Risk

Risk IDRisk NameAnalysis ID RefValue
1Risk1112
2Risk2126

Action

Action IDAction NameRisk ID Ref
1Action12
2Action22

In my App I can create another new empty analysis or create a new analysis copied from one existed (like the Alalysis with ID = 1). Beyond the copy of the analysis's values, I need to copy all the related risks and all the related action of each risk. Obviously, all the IDs must be changed with the correct references.

How can I do this operation automatically? Do I need AppsScript? I use Sheet like database.

Thank you for support

Best regards

Massimo Cimetti

0 2 70
2 REPLIES 2

Please follow the instructions below

1. Create a parent action in the Analysis table and set it as 'Sequence'

2. Create an action to 'Add a new row in another table' for the row in Analysis table

3. Create an action in Analysis to execute an action to set of rows for the Risk table and target the action you will create in #4

4. Create a sequence and add the actions you will create in #5 and #6

5. Create an action to 'Add a new row in another table' in Risk table and set the value of [Analysis ID Ref] as MAXROW("Analysis", "_RowNumber")

6. Create an action in Risk table to execute an action to set of rows for the Action table and target the action you will create in #7

7. Create an action to 'Add a new row in another table' in Action table and set the value of [Risk ID Ref] as MAXROW("Risk", "_RowNumber")


At the end you should have these actions

Analysis Table
Action 1 - sequence
Action 2 - add a new row in another table (Analysis Table)
Action 3 - execute on set of rows (target action is action 4)

Risk Table
Action 4 - sequence
Action 5 - add a new row in another table (Risk Table)
Action 6 - execute on set of rows (target action is action 7)

Action Table
Action 7 - add a new row in another table (Action Table)

Hey hey!

I've got an app that you could copy that would fit this situation 100%

https://www.appsheet.com/templates/Inspections-Checklists-Questionnaires-oh-my?appGuidString=2ff8a48...

--------------------------------------------------------------------------------------------------------------------

If that's not quite what you're looking for, you might try the Blueprint tables sample app:

This technique is a very handy tool to have in your AppSheet toolbelt.

  • It involves creating a "Blueprint" side of things, and then a data collection side of things.

https://www.appsheet.com/templates/How-to-use-a-Blueprint-Table-for-CustomerSpecific-Products-Part-1...

Top Labels in this Space