Button to erase data from 1 column and copy data to that now erased/blank column


I am a fairly new user of Coda. I am trying to automate a process by creating a Button on our document.

Essentially, we have 3 columns of text. The first column we want for our current week’s comments; the second we have the prior week’s comments; the third we have our 2-weeks-ago comments. So each week, we have to manually delete the text in the 2-weeks-ago comments column; we have to move the text from the prior week’s comments column to the 2-weeks-ago comments column; and we have to move the text from the current week’s comments column to the prior week’s comments column. That now allows our current week’s column to be blank, so that we are able to input our current comments, while retaining the comments from the prior 2 weeks.

I have tried a few different formulas in the button field, but so far I am not having any luck. Any ideas? Or is this not currently possible in Coda?

Thank you!

HI Kayla,

I have extracted an action items table from one of my docs, shown below. There are three columns, doing something similar to what you are looking for.

Action update is where you enter your regular updates. Before the next update, the Archive button will take that comment, and push it on top of the column Action Update Archive.

If you have to have the three columns, you could modify the button to copy two to three, then one to two, overwriting in each instance.

Please have a look, let me know if you have any questions.

Rambling Pete

Hi @Piet_Strydom,

I really appreciate your response! So if I’m understanding correctly, we would have to click the Archive button on each row, right? So on your example, we would have to click 6 Archive Action Update buttons to get all the data “moved over” essentially.

If I am understanding that correctly, I believe it would still take the same amount of time to use that approach to the one we currently use (with deleting, copying and pasting). But thank you so much for the input.


Hi Kayla,

That is the way that I have set it up for my needs, as I archive the comments when I update.

But I have added a button that will push all the buttons in the table. It is also possible to do it without the table button, but my thinking for the day is finished… :wink:


1 Like

Hi @Kayla_Weaver,

You can create a button to push the buttons.

The button would be along the lines of:

FormulaMap is a “for everything in a list do this for each item” formula. This also applies to table filters.


Essentially what this code does is take a table or view, filter it to the conditions you set, and then because of FormulaMap for every matching row it it presses the button in ButtonColumnName.

You can get more advanced than this by having the code the copies the data to a new table and then deletes the row within the same button press.

Table.Filter(Name>3).FormulaMap( code here to copy data to another table and then delete it)

This button can be pressed via automation on a schedule too if that helps. Don’t forget to consider your automation quota beforehand.

Kind regards


1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.