How to get the selected items in the local data filter(JMP 17) During the analysis process, we sometimes need to perform corresponding automated analysis based on the content I have filtered in the local filter of the Graph Builder. However, I don’t know how to get the selected content in this filter. Is there any good method? Thank you.
Automation and ScriptingRe: How to get the selected items in the local data filterUsually, 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;Re: How to get the selected items in the local data filterDepending on what you mean by "corresponding automated analysis", another approach could be:
Local Data Filter -> Red Triangle -> Show Subset
This opens a Linked Subset of your data. You could run your analysis from there. Or, if you Select All (Ctrl+A) from there, that also selects those rows in your parent Data Table.
By the way, you can also "Save Where Clause" from the same Dropdown. This is helpful if you might want to re-use this same filter later.
Re: How to get the selected items in the local data filterThank you very much. This is exactly what I wanted!!
I have a new question: How can I use JSL to detect changes in the selection within a local data filter?
(Because I created a custom interface where the top part is the Graph Builder and the bottom part is a data table, and I want the form below to update synchronously when the filter selection changes. So, I need to know how to determine when the filter selection has been altered.)
Thank you.
Re: How to get the selected items in the local data filterTake a look at Data Filter from Scripting Index to get a good general idea what options you have

In this case you would most likely go with << Make Filter Change Handler.
You might also consider using (Global) Data Filter instead of Local Data Filter, it will make the row state changes directly to the data table.