- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Retrieving Selected Items from Filter in JMP Graph Using JSL
In JMP, the values entered in the Text edit box can be retrieved using get text(); for items in the List box, they can be retrieved using get items().
Is there a way to get the currently selected items in the Filter of the current Graph? In the JSL below, I hope that when the Saving button above is pressed, I can obtain the items selected by the user in the Filter. How can I achieve this?
For example, how should I record that the user has selected "14 years old" in the Age Filter?
New Window( "Chamber condition checker",
SavingButton=Button Box( "Save filter setting",),
Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 36 ) ), Smoother( X, Y, Legend( 37 ) ) ),
Local Data Filter( Add Filter( columns( :age ), Where( :age == 12 ), Display( :age, N Items( 6 ) ) ) )
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Retrieving Selected Items from Filter in JMP Graph Using JSL
You can use << Get Where clause on the filter object
Names Default To Here(1);
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(528, 456),
Show Control Panel(0),
Variables(X(:weight), Y(:height)),
Elements(Points(X, Y, Legend(36)), Smoother(X, Y, Legend(37))),
Local Data Filter(Add Filter(columns(:age), Where(:age == 12), Display(:age, N Items(6))))
);
((gb << Top Parent)["Local Data Filter"] << Get Scriptable Object) << Get where clause;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Retrieving Selected Items from Filter in JMP Graph Using JSL
To get the selected rows, talk to the LDF and ask : Get Filtered rows()
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(400, 400),
Show Control Panel(0),
Variables(X(:weight), Y(:height)),
Elements(Points(X, Y)),
Local Data Filter( Add Filter(columns(:age), Where(:age == 14)))
);
(current report()["Local Data Filter"] << Get Scriptable Object) << Get Filtered rows;
Often I want to create a subset with the selected rows.
To generate such a subset, you can click on
in the GraphBuilder (aka Report) Toolbar which can be downloaded from the Markeplace: https://marketplace.jmp.com/appdetails/Graph+Builder+Toolbar