@txnelson ,thank you very much for reply. it really works.
I am new JSLer. I have to seek for your help here: How can I use the selected column to replace "dt:number" in following JSL?
Names Default To Here( 1 );
dt = Current Data Table( );
// Stop the script if no open data tables
If( Is Empty( dt ), Stop());
// Make list of column names
colNames = dt << get column names();
// Select the column
nw = New Window("Column names", <<Modal,
PanelBox("Pick a column",
dtlb = ListBox(colNames, MaxSelected(1), columnSelected = (dtlb << get selected)[1] )
),
H List Box( ButtonBox("OK"), button box("Cancel"); )
);
If( nw["button"] == -1, throw() );
// Convert character column to a literal string value
inString = "'" || Concat Items( dt:number[Index( 1, N Rows( dt ) )], "','" ) || "'";