Using fully customized filters could be fairly simple solution. This on other hand might not be even if it works (this one time)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Data Filter(
Location({2793, 233}),
Conditional,
Mode(Show(1), Include(1)),
Add Filter(
columns(:age, :name),
Display(:age, N Items(6)),
Display(:name, N Items(15), Find(Set Text("")))
)
);
(Window("Data Filter for Big Class")["Data Filter",LineUpBox(2)]) << NCol(2);
(Window("Data Filter for Big Class")["Data Filter",LineUpRulerBox(1)]) << Widths({300,300});
Below are some modifications to your script using Filter Change Handler (state handlers can be very buggy and finicky in JMP, you have been warned :))
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << clear row states;
Summarize(myage = By(:age));
//make a dialog window
nw = New Window("Sample",
vlb1 = H List Box(
lb1 = Border Box(
obj1 = dt << Data Filter(Add Filter(columns(:age)), Display(:age, "Radio Box Display"), Mode(Select(1), Show(1), Include(1)))
),
lb2 = Border Box()
)
);
// Creates list of names that are not excluded or hidden
f = function({a},
Try(Summarize(myname = By(:name)));
//here is the script that runs each time someone clicks in the top box
//delete the current column list box, if it exists
Try((lb2 << child) << delete box());
//append a new col list box, with all columns of the data table selected in the listbox
lb2 << append(
Panel Box("Select Script", sel1 = Radio Box(myname, Show(my_names = sel1 << Get Selected)))
);
);
fch = obj1 << Make Filter Change Handler(f);
-Jarmo