Trigger automations when opening/closing sections

Is it possible to trigger an automation based on closing or opening a Coda section? I think I was able to do this when I used Hypercard back in the day (“on openCard”)… My use case is to reset filters operating on tables when I close/leave (or open) a section in my document. Right now, it looks like automations are only triggered by changes to a table, or by time, but perhaps I’m missing something?

Or is there another way to achieve this?

Thanks,
JB

The closest thing would be having a button at the top that you’d click every time you open a section.

But just out of curiosity, how would you clear the filters?

@Dalmo_Mendonca I have a trick I use for this. I have a hidden checkbox in a column called ‘Display?’. I set a filter on the table for ‘Display = true()’, and then I use buttons to update the ‘Display?’ checkbox based on whatever criteria I have.

It’s a bit slow, but it works.

Joe

1 Like

How I clear the filters: In addition to the main table, I have an additional one-row, three column table - column 1 provides the instructions, column two is a select field representing the filter for the main table and column 3 is the very ‘reset’ button you recommend.

For example, if the goal of the filter is to view the data by month, the select field in the “control table” is a list of months. The main table filter is set to the value of the select field. The reset button makes the select field “blank”.

But I wish this didn’t need to be manual. As I said, in Hypercard you could trigger an action from an “onOpen” or “onLeave” function.

JB

1 Like