Usually, I use << Get Where Clause or << Get Filtered Rows as the selections done can be quite complicated.
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(525, 454),
Show Control Panel(0),
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Smoother(X, Y, Legend(10)))
);
ldf = gb << Local Data Filter(
Add Filter(columns(:age), Where(:age == 12), Display(:age, N Items(6)))
);
Show(ldf << Get Where Clause);
Show(ldf << Get Filtered Rows);
You can also access the display box and use that, for example in my example it is List Box (List Display) but usually I would avoid this option
nw = (gb << top parent);
nw[OutlineBox("Local Data Filter"), ListBoxBox(1)] << get selected;
-Jarmo