It has been a while since I posted this a got a good answer. I wanted to share the script I developed to allow for quickly viewing the formulas in columns in a data table, allowing to switch columns interactively.
/* this script presents a list of columns in the current data table
in a list box, and upon selecting a column, if the column has a formula,
it will display the formula below the list box as a picture.
If the column does not have a formula, "No Column Formula" is displayed
*/
Names Default To Here( 1 );
_dt = Current Data Table();
expr_ShowFormulaAsPicture = Expr(
_vb1 << Delete;
_vb << Append( _vb1 = V List Box() );
_c = Column( dt, (_clb << Get Selected)[1] );
If( Is Empty( _c << Get Property( "Formula" ) ),
_vb1 << Append( Text Box( "No Column Formula" ) ),
_vb1 << Append( Picture Box( Expr As Picture( _c << get formula ) ) )
);
);
New Window( "Show Column Formula as Picture",
_vb = V List Box(
)
);
_vb << Append(
_pb = Panel Box( "Select Column With Formula To Display as Picture",
_clb = Col List Box(
_dt,
max selected( 1 ),
grouped,
all,
On Change( expr_ShowFormulaAsPicture )
)
)
);
_vb << Append( _vb1 = V List Box() );
Example window here: