Have a look at the column dialog or filter col selector functions to let the user pick a column (the following examples are from the Scripting Index):
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
Column Dialog(
ex y = ColList( "Y", Min Col( 1 ), Max Col( 2 ), Data Type( "Numeric" ) ),
ex x = ColList( "X", Max Col( 1 ), Modeling Type( {"Continuous", "Multiple Response"} ) ),
Line Up( 2, Text Box( "Alpha" ), ex = EditNumber( .05 ), Text Box( "Beta" ), ey = EditText( "xyz" ) ),
HList( cb = Check Box( "check", 1 ) ),
HList( combo = Combo Box( "option1", "option2" ) ),
HList( rb = RadioButtons( "a", "b" ) )
);
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Col List Box Example", fontobj = lb = Filter Col Selector( width( 250 ) ) );
A radio box might help select levels of a column:
Names Default To Here( 1 );
dt = Open("$Sample_data/Big Class.jmp");
New Window( "Example", rb = Radio Box( associative array( dt:sex << get values ) << get keys ) );