How to dynamically reference the name of a column and use to select data from a table?

Searched everywhere and cannot find a solution for this …

I have a table with columns named by date, such as JAN 10, JAN 20, JAN 30.

If today is JAN 10, then I want to grab data from the column JAN 10.

I use a formula with function Today() to build the string “JAN 10” and I name the formula myColumnName but I cannot figure out how to use myColumnName to grab data from the table.

I’ve tried TableName.myColumnName and a variety of formats, but can’t get it to work.

Any suggestions?

2 Likes

hi @Mathew_Georghiou , welcome!

As far as I know the table name and the table column should be defined manually and via formulas you can work with row information. You cannot filter on columns with something like SelectColumns(tableName, if(name=“whatever”, selectColumn, ‘something if not’))

sorry, best, christiaan

Sorry best Christiaan

2 Likes

It would be useful to just Display the column name in a formula.
Something like this, that returns a string, that is the name of the column.
(Coda AI actually tells you this is possible!)
= TableX.Column 1.Name()

1 Like

I vote and agree : I want to setup a filter on a list that will show only duplicates in a specific column.
like :

Duplicates(ListCombine(mytable.ColumnNameRetrievedOnPageInputBox))

Would be insanely useful and efficient on big datasets…

I also agree this would be useful!

I’ve made a suggestion here that I believe would solve this :slight_smile: