How do I move multiple referenced items to a new table in one expression/Automation/action?

Hello,

If I have 6 tables: Project, Subtasks, Notes, ArchivedProjects, ArchivedTasks, ArchivedNotes

I have a button/action/automation that if you click on a specific project, then click โ€œArchive Projectโ€ it copies the row to Archivedprojects and Deletes it from Project.

Is there a way for it to also move the related tasks, and notes to the respected tables?

0 2 124
2 REPLIES 2

Hi!

Are you talking about CASCADE DOWN type of thing those are available in RDBMS?

Not automatically. You will need to create a set of Actions to perform the moves.

However, if you have established the correct relationships, you should see the lists [Related Subtasks] and [Related Notes] columns. You would simply pass these to an action of type โ€œexecute an action on a set of rowsโ€ (one for each list). The referenced action would perform the actual โ€œmoveโ€ operation.

For deleting, if your relationships are Parent/Child relationships (i.e. you used the โ€œIsPartOfโ€ column setting), then you will only need to delete the Project row. The child rows from the other tables will be automatically deletedโ€ฆthe โ€œCASCADE DOWN type thingโ€ that @shahappsheet mentions.

If any of this is unfamiliar to you, let us know and we can point you to articles to give more details.

Top Labels in this Space