Having added show(pp); the log does indeed show the column names are returned, but the columns are still not being selected - please see the full log below. Any ideas? Many thanks.
//:*/
dt=current data table();
pp=dt<<Get Column Names();
show (pp);
ncols = N Items(pp); for(k=1, k<=ncols, k++, pp[k] << Set Selected(1));
dt << Compress Selected Columns();
dt << Clear Column Selection;
/*:
pp = {id, yr, rgC, rtC, ptC, cmdC, qtC, TdeQ, NetW, TdeV};
Send Expects Scriptable Object{1} in access or evaluation of 'Send' , pp[k] << /*###*/Set Selected( 1 ) /*###*/
In the following script, error marked by /*###*/
dt = Current Data Table();
pp = dt << Get Column Names();
Show( pp );
ncols = N Items( pp );
For( k = 1, k <= ncols, k++,
pp[k] << /*###*/Set Selected( 1 ) /*###*/
);
dt << Compress Selected Columns();
dt << Clear Column Selection;