Hi!
What's the right way to reference a column by index? Ideally I was looking for something like this:

Thank you in advance!
You should be able to use just Column(index).
Send Messages to Data Column Objects
col = Column( 2 ); // assign a reference to the second column
It may be true for scripts, but in formulas I get this error:

Interestingly, the popup suggests thatthe number can be provided, but it doesn't appear to be the case

Try with << get name instead of Column Name()
Choose(:Block,
Column(1) << get name,
Column(2) << get name,
Column(3) << get name
)

Full example:
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(3),
Compress File When Saved(1),
New Column("Block", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3])),
New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([1, ., .])),
New Column("Column 3", Numeric, "Continuous", Format("Best", 12), Set Values([2, ., .])),
New Column("Column 4", Numeric, "Continuous", Format("Best", 12), Set Values([3, ., .])),
New Column("Formula",
Character,
"Nominal",
Formula(Choose(:Block, Column(1) << get name, Column(2) << get name, Column(3) << get name))
)
);