I think this does what you asked:
New Table( "Untitled",
Add Rows( 3 ),
New Table Variable( "abc", "[\!"a\!"=>1, \!"b\!"=>2, \!"c\!"=>4]" ),
New Column( "Column 1",
Numeric,
"Nominal",
Format( "Best", 9 ),
Formula(
c_abc = As Constant( Eval( Parse( :abc ) ) );
c_abc["c"];
),
Set Selected
)
)
Note the table variable is just text, so it gets parsed and evaluated. The AsConstant function makes it only parse/eval once for the entire column's evaluation, so it won't be too inefficient.
As an alternative, you could have a separate table variable for each element of the associative array. It might be easier to edit, but it won't create an isolated namespace like the associative array.
Another alternative is to use custom column properties if the names are going to be column names. They might be harder to find and edit. Unlike the text-only table variable, they also hold expressions:
dt=New Table( "Untitled",
New Column( "Column 1",
Set Property( "xxxxx", ["a"=>42,"adfasdfasdf"=>77] )
)
);
(dt:column1<<getproperty("xxxxx"))["a"] // 42
Craige