Connect Column Names with String Col BoxHi JSL Experts,
I would like to connect column names with a String Col Box with the example below. The Col List Box will update the column status (add/delete/rename) automatically which is the functionality I need for the String Col Box. So, I create a Col List Box and then connect it to the String Col Box.
It seems works, but I would like to hide the Col List Box or run it at the background. However, when I set Box1<
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New window("Connect dt with String Col box",
Box1=Col list box(dt, all,
on change(
Cols=Box1<<GET items=""></GET>Best,
Tzu-Chun Wu
Data Blending and CleanupRe: Connect Column Names with String Col BoxHi Dave,
The Outline Box approach does not work, but the Subscribe function is exactly what I need. Thanks again for your suggestion and help. If someone is interested in the Subscribe function, please check the link https://www.jmp.com/support/help/14/subscribe-to-a-data-table.shtml
Tzu-Chun
Re: Connect Column Names with String Col BoxYou can subscribe to a table to detect changes - this avoids using Col List Box but is a complex route.
Perhaps you could just place the display box inside a closed outline box ?
OutlineBox("-", <<CLOSE></CLOSE>Re: Connect Column Names with String Col BoxHi Dave,
I would like to create a string col box which reflect the column change of a data table. For example, if I have columns {"Column 1", "Column 2"} and add a new column "Column 3" later, it will be great if the string column box can be updated automatically without any other actions.
dt=new table("Table",
New column("Column 1"),
New column("Column 2")
);
New window("",
Table box(
String Col box("Columns", dt<<GET column="" names=""></GET>
The "get column names" is a good idea, but the string col box will not be updated automatically. Here is the comparison between String Col box and Col list box.
before adding column 3

After Adding Column 3

Help the details helps.
Tzu-Chun
Re: Connect Column Names with String Col BoxNot really sure what you are trying to do here. Do you really want a Col List Box or are you just using it to get a list of columns. If the later, then you can just write:
col = dt << getColumnNames(string)
where dt is a reference to a data table, for example:
dt = currentDataTable();