save filter settings and use this settings to reset the filteris it possible to save filter settings and use this settings to reset the filter?
minimal example:
dt=open("$sample_data/big class.jmp");
new window("test",
ldf=dt<< Data Filter( Add Filter( columns( :sex ), Where( :sex == "F" ) ));
);
//[save the filter settings]
ldf<<CLEAR></CLEAR>
Thank You!
Re: save filter settings and use this settings to reset the filterThank you, for your answer. It worked out totally suficient.
Re: save filter settings and use this settings to reset the filterThe documentation, along with examples of each of the items you are working with are available in the Scripting Index. I suggest you familiarize yourself with it.
Help==>Scripting Index
Secondly, I believe what you really want to use, is the ability to Save and Apply Favorites. See the Scripting Index for details and examples. Here is an example based upon your included example
dt = Open( "$sample_data/big class.jmp" );
ldf = dt << Data Filter(
Mode( Show( 1 ), Include( 1 ) ),
Add Filter( columns( :sex ), Where( :sex == "F" ) )
);
ldf << add favorites("savedit");
Wait( 5 );
ldf<<DELETE all="" wait=""></DELETE>Re: save filter settings and use this settings to reset the filterThank you Jim,
we want to reset the data filter after some data manipulations to its orginal settings. can one of the statements to do this.
dt=open("$sample_data/big class.jmp");
new window("test",
ldf=dt<< Data Filter( Mode( Show( 1 ), Include( 1 ) ), Add Filter( columns( :sex ),
Where( :sex == "F" ) ));
);
txt = ldf << Get Script;
txt2 = ldf << get where clause;
ldf<<CLEAR></CLEAR>Re: save filter settings and use this settings to reset the filterYou can save the script for the filter, and then run that script.
txt = obj << Get Script;
Or, you can have it retrieve the Where Clause it generated
txt = obj << get where clause;