Best practice to export data via cross-doc?

Hi guys,

I have one big doc with many tables, including 1 main table with many columns with formulas and buttons. Thousands of rows are being added every month. In order to keep this doc “workable” I want to create a workflow where old entries of that table will be moved to a separate doc that functions as an archive of sorts.

So I’ve created a button (column) in the source table with a Cross-doc AddRow() formula. When I press that button, that row from the source table will be added to the back-up table (and another workflow to delete those rows from the source doc). So far so good.

But of course I don’t want to manually push that button for every row. So I want to add a control which lets me filter out which rows should be exported (a.k.a. which buttons should be pushed). This is where the problems start.

I’ve created a new button (control). In the Action field I have a Filter() formula to filter out only the rows I want to be pushed. Then I want to tell Coda to only push the buttons in the source table from those rows. But how do I reference that button from the source table? The name is not recognised.

Maybe I should skip that button (column) all together and just create a single control that first filters the correct rows and then add the Cross-doc AddRow() formula? But I can’t get cross-doc to work in the formula either.

What is the best practice to do this?

(Unfortunately I can’t share the source doc because of sensitive data. But I hope the use case is clear?)

Hey there @Bas_de_Bruijn !

I read through it kind of fast, but could you just write some disable if criteria into your buttons to disable the buttons you don’t want pushed?

1 Like

You can reference the button by referencing the button column in your filter formula. E.g. [Table].Filter( query ).Button.

The disable formula hack mentioned below could also work, so you can reference the button column without the filter in place: [Table].Button. All the disabled buttons would be skipped in the latter scenario.

Thanks @Scott_Collier-Weir and @Renita_Mwangachuchu!

You’re right @Scott_Collier-Weir , I could use the disable if criteria in the button itself instead of a filter formula in the control. But that doesn’t solve how to push those buttons via the control :wink:

The suggestion from @Renita_Mwangachuchu worked in the end. I already tried that before but it didn’t work. Deleting the formula and typing it again somehow did the trick :man_shrugging:

(cue the classic IT support reply: “have you tried turning it off and on again?” :sweat_smile:)

1 Like

Hey there @Bas_de_Bruijn ! It will solve pushing the button with the control (unless I’m misunderstanding your original post) You still just push the entire column via an automation or canvas based button and only the active buttons will be pushed.

1 Like