Add 'currentColumn' to a table's button scope

When a button is clicked on a table, there is no option to "run script", just to run a query.
That would be fine if I could determine which column was clicked on.

The query seems to inherit both 'currentRow' and 'i'- but not which column was clicked on.
If column matters- a different query is needed for each column, which makes maintaining it difficult.

Could you pass the current column into the scope for queries ran?
For example, if I click on the column "date"- then the variable 'currentColumn' would be equal to that string.

1 Like

Hey @Kade333!

You should actually be able to use {{ selectedCell.columnName }} to access the column name of the cell you just clicked on. Let us know how this works for you :blush:

Thank you for the work around. I am worried that for some reason the cell won't get selected when the button is clicked- but as long as that never happens this should work.