BookmarkSubscribe
Choose Language Hide Translation Bar
Highlighted
Shunee
Occasional Contributor

How to ovverride the previous Data Filter?

I have multiple Data Filter in my script. My second data filter can't ovveride the first data filter after running the second data filter. As a side note, I did put on the Data Filter Auto Clear function.

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to ovverride the previous Data Filter?

There is a "Delete All" message that can be used to clear all of the filters from a Data Filter.  Look in the Scripting Index for the documentation

     Help==>Scripting Index

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt << Data Filter(
	Add Filter(
		columns( :Region, :POP ),
		where( :Region == {"C", "N"} )
	),
	Mode( Select( 0 ), Show( 0 ), Include( 1 ) )
);
obj << Columns( :Region, :SO2, :CO, :State );
Wait( 2 );
obj << Delete All;
obj << Add Filter( (columns( :state )) );
Jim
1 REPLY 1
txnelson
Super User

Re: How to ovverride the previous Data Filter?

There is a "Delete All" message that can be used to clear all of the filters from a Data Filter.  Look in the Scripting Index for the documentation

     Help==>Scripting Index

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt << Data Filter(
	Add Filter(
		columns( :Region, :POP ),
		where( :Region == {"C", "N"} )
	),
	Mode( Select( 0 ), Show( 0 ), Include( 1 ) )
);
obj << Columns( :Region, :SO2, :CO, :State );
Wait( 2 );
obj << Delete All;
obj << Add Filter( (columns( :state )) );
Jim