Disable button in row until next change in row?

Hi!

I have a table that includes a button on each row that will archive the row to another table.

But I have a short attention span, so sometimes I forget if I archived a particular row or not.

Is there a way to disable the button once it’s been pushed and the row has been archived until the next time a value is changed in the row and the row needs to be archived again?

Many thanks for any guidance you can offer!

Gregg

Hey @Gregg_Stebben you can set up an automation to watch the row for changes, and then when it changes, have it push a button!

Hi @Gregg_Stebben,

I think something like this might work. The idea is the archive button writes the current timestamp to a column. Then we use the Modified() formula for the Task column to compare the two. If one is greater than the other, it’s archived. Then when you mark archive after it’s been edited, it will bump the archive timestamp to a new time greater than the Modified() timestamp from the edit.

1 Like

This is PERFECT!!!
THANK YOU!
Gregg

Hi, BenLee…when I tried to add in the table where things should be archived, I got stuck.

I already had a button that would archive each row, using this formula:
RunActions(AddRow([Hitlist Archive],[Hitlist Archive].Hitlist,thisRow.Hitlist,[Hitlist Archive].[Stock Symbols],thisRow.[Stock Symbols],[Hitlist Archive].Intentions,thisRow.Intentions,[Hitlist Archive].Notes,thisRow.Notes))

When I add your ModifyRows formula (see below) I get an error saying “Missing arguments in formula: Expected at least 11, but got 10 arguments for Add Row.”

I tried to solve the problem, but had no luck…can you help?

Here’s the formula I used:
RunActions(AddRow([Hitlist Archive],[Hitlist Archive].Hitlist,thisRow.Hitlist,[Hitlist Archive].[Stock Symbols],thisRow.[Stock Symbols],[Hitlist Archive].Intentions,thisRow.Intentions,[Hitlist Archive].Notes,thisRow.Notes,ModifyRows(thisRow,[Indices Filter].[Last Archived],Now())))

Thank you for any help you can offer!
Gregg

Oh, I didn’t pick up that you were adding rows between tables. This is written to work within one table.

With Coda’s views of tables, is there a reason you need a second table? If this is something that needs to be marked as Archived and then resurfaced, I’d suggest just keeping everything in a single table and then use views and table filters to only show what you need.

You could have the main table filtered to “Not Archived” and a view of archived items filtered to “Archived”.

There might be other requirements that could influence this, but in general, one table is a great way to go.

You are not the first one to suggest the one table approach :wink:

Philosophically, I like the idea…but in practice, I don’t know how to do it.

With the formula you provided…how do I see the archived rows again?

FWIW, here’s the use case:

I have a master list of 300 stocks.

I review the master list twice a day.

What I am trying to do is to flag stocks of interest with date and time during those review sessions and I sometimes add notes in a note column, and I want to archive each stock, date and time and note every time it gets flagged.

The archiving allows me to see:

  • What stocks were flagged during a particular review session
  • When each stock has been flagged

To do this, I have been flagging stocks of interest with date/time and notes in two columns on the master table, and then every time something gets flagged with the date and time, I copy the row to an Archive table. When I am ready to flag a stock with a new date/time and note, I write over the earlier date/time and note and archive again.

Is there really a way to do this with one table?

PS I realize this sounds really complicated…but in very little time, I have already used Coda to dramatically simplify the process from my pre-Covid process.

Many thanks, Gregg

And I guess I should also ask…is there a way to make this formula work?
RunActions(AddRow([Hitlist Archive],[Hitlist Archive].Hitlist,thisRow.Hitlist,[Hitlist Archive].[Stock Symbols],thisRow.[Stock Symbols],[Hitlist Archive].Intentions,thisRow.Intentions,[Hitlist Archive].Notes,thisRow.Notes,ModifyRows(thisRow,[Indices Filter].[Last Archived],Now())))

Thank you!

Gregg