A very common question in the Coda community I see is:
How do I take an entire rows worth of data, or even multiple rows, and pass that data to a NEW table?
The answer often given is:
You need to set up a button in Coda that does two things: (1) Adds a row to a new table with all the fields from the current row mapped (2) Delete the current row
While this method DOES work, it has two fatal flaws:
Not Scalable: This method requires the user to manually map one columns value, to the other tables corresponding column. But what happens when you add a new column of information? The user is then required to add more information to their button column. So awful.
Only one doc: This method only allows you to transfer row-data from one table to another table in the SAME DOCUMENT. You cannot send that data to a different document.
ENTER THE SOLUTION
Welcome to the solution, the Table Duplicator
Its a new pack I developed that allows you to quickly and easily transfer table data from one table to a separate table - In the same doc or across documents.
It uses a NAME-MATCH feature so it dynamically maps columns from one table to another based off shared names. So make sure you have those column names mapped correctly!
I can see it being used for:
Cross-doc sharing to handle private data
Hope you like it. Let me know your thoughts should you have any! I feel like @Nick_Solyom might like this pack
Hi Scott, How do you set up the API token to allow access to both the source and target doc? For the Source and Target DocURLs, do you use the URLs from the SHARE button and set access to EDIT? Also, I think that there is a typo in the instructions. TargetDocURL should read “Data to”. I can set up the button, but data is not being populated in the target table. The columns in both the target and source data are the same and the button returns a message that there was an external action performed.
Woah! This is cool, and excited by the possibilities. I’m still testing and have got it working. A couple of questions:
The instructions say its possible to send filtered table data. So I’m trying to see if I can send updates to the table to only add rows where the Date column is after a specific date. For this I tried filtering the source table thisRow.Date > ToDate(“2023-06-30”), which does filter the source table, but all the rows were copied over, including rows where Date is before the filter date.
There appears to be a lag of some kind - if I edit data in the table then hit the button to send the data, the unedited data goes over. With some experimentation it appears to be about 30 seconds latency - if I hit the button less than 30s after editing the edits don’t transfer, but 30s+ and the edits do transfer. Is there some way I can build a 30s delay into the button? Or a way where it waits until whatever this process is has completed before executing?
When you want to send filtered table data, you need to use the view-id from an actual view of the original table. If you FILTER the original table that won’t be good enough. You actually have to create a SECOND view of the original table, filter it accordingly, and then use that Views ID
Hey Scott! This is awesome and solves so many of my problems. Curious if this doesn’t duplicate rows that have groupings? I tried with groupings and it wasn’t duplicating but once I removed them it transferred over.