There's a convenient construct for searching a column using a list with the contains function. The code below shows how to use it:
dt = open("$sample_data\big class.jmp");
Summarize( age_list = By( Column( dt, "age" ) ) );
alist_num = {};
for (i = 1, i <= nitems(age_list), i++,
alist_num[i] = num(age_list[i]);
);
nw = New Window( "Choose ages",
hb = Panel Box( "Choose ages",
select1 = List Box(
age_list,
dt << Select Where( contains(alist_num[select1 << get selected indices], :age) );
selRows = dt << Get Selected Rows;
)
),
Button Box( "OK",
dt << Select Where( contains(alist_num[select1 << get selected indices], :age) );
/* Selected rows are subsetted into new table. */
dt << Subset( Output Table Name( "Chosen ages" ) );
nw << Close Window;
)
);