Feature request - Making Table names usable as reference/variable in formulas

Hi,

This is pretty much it, it would be useful to be able to use the very name of a table as a variable in a formula.

The use case leading me to propose this feature :slight_smile:

I have tables each named a year (for instance : 2021). Each table has the same logic.
Each table features columns using “ToDate” to fill all rows with the 1st day of January, and last day of December.

I populate all the cells with a formula like this : ToDate(“2021-01-01”) / ToDate(“2021-12-31”)

I would like to be able to write something like : ToDate(Concatenate([TableNameWhichIsAYear4DigitNumber], “-01-01”)) so that when I duplicate my table for a new year, this automagically takes into account the name of the new table (2022, 2023, …) to populate the cells…

Note : These values are then used in the formula of another column to compute the month corresponding to a week number (the rows in the table are going from 1 all the way to 52 : numbers of week, as plain numbers, no formula. But of course, depending on the year, a week can be in this or that month. [And the complex formula that computes what month, in the given year, corresponds to what week number, performs a Sequence from 1st January to 31st December](How to get the corresponding month name from a weeknumber? : How to get the corresponding month name from a weeknumber? - #5 by Christiaan_Huizer), so there is the need for both columns with both dates.

I hope this is clear enough…

Best

Can I ask why you have different tables by year? Your setup sounds un-Coda-ish to me.

Whenever you have multiple tables with the same formulas/columns/logic, you should ask yourself if they can be combined into a single table (and then, if you’d like, you can create different filtered views of that primary table - for example a 2021 view with a filter of Date >= 2021-01-01 AND Date <= 2021-12-31)

1 Like