Staff

Re: Controlling table with many columns

You may not need the extra table if you use something like this:

Names Default To Here( 1 );

// Get a table
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dtname = dt << getName;

// Expression that is invoked whenever a new selection is made in the column selector
selectionScript =
Expr(
	colsSelected = fcs << getSelected;
	dt << clearColumnSelection;
	dt << selectColumns(colsSelected);
	);

// User interface
New Window("Select Columns in "||dtname,
	fcs = Filter Col Selector( Data Table( dtname ), Width(300), Script(selectionScript) );
	);

The 'red triangle' options in the filter might help you to find (then select) the columns you need, and it will also show any column groups you might have defined.