Need Help with "Copy List" Button Across Tables

 

Hi everyone,

I'm currently working on an app with custom lists, and I'm working on implementing a "Copy List and all items" button.

The goal is for users to click the button and duplicate an entire list, along with all its items, into a new list. The lists are stored in the "MAIN" table (columns: LIST ID, LIST NAME), and the items are in the "CONTENT" table (columns: LIST ID, ITEM NAME, ITEM DESCRIPTION).

I tried a grouped action, but it appears limited to actions within the same table. Any suggestions on how to achieve this, considering the need to create a new list in "MAIN" and copy items to "CONTENT"?

Thanks for your insights!

0 1 100
1 REPLY 1

Hey man,

it's trivial.
1. Create a new Temporary ID  for the new MAIN Table Record via UNIQUEID() on the Source Record
2. Create the Target Record in MAIN Table (LIST ID = Temp ID)
3. Create Target Items in Content Table (LIST ID = Temp ID) You can use this apporach: https://www.googlecloudcommunity.com/gc/Tips-Tricks/FAQ-Add-a-number-of-rows/td-p/308380
4. Link to Target Record via LINKTOROW([Temp ID], "MAIN_Detail")

Cheers

 

Top Labels in this Space