Subscribe Bookmark RSS Feed

how to remove a local data filter column?

newbie_alex

Contributor

Joined:

May 18, 2017

Hello,

 

I have a problem that can be simplified to the following example:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );

obj = dt << Data Filter(
	Add Filter(
		columns( :Region, :POP )
	)
);

Is there a way to remove :Region from the data filter without deleting the data filter and creating a new one?

 

Thank you for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
markbailey

Staff

Joined:

Jun 23, 2011

Solution

Select Help > Scripting Index > Objects > Data Filter > Delete. There you will find the same example:

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( 1 );
obj << Delete( {:State} );
Learn it once, use it forever!
1 REPLY
markbailey

Staff

Joined:

Jun 23, 2011

Solution

Select Help > Scripting Index > Objects > Data Filter > Delete. There you will find the same example:

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( 1 );
obj << Delete( {:State} );
Learn it once, use it forever!