JMP has the functionality to request user input and then pass that information into whatever scripting is required. I recommend that you take the time to read through the Scripting Guide.
Here is a very simple example to do what you want. Far better interfaces can be developed, but this should give you a start
Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "Col List Box Example",
Text Box( "Select the Grouping Columns" ),
Col List Box( all, width( 250 ), maxSelected( 1 ) ),
fontobj = lb = Col List Box( character ),
OKbb = Button Box( "OK",
theColumns = lb << get items;
nw << close window;
Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Analysis Columns( :height, :weight ), Statistics( Mean ) ),
Row Table( Grouping Columns( eval(theColumns) ) )
)
);
)
);
Jim