Subscribe Bookmark RSS Feed

Data Filter Window

Hi folks,

I'm having some difficulty closing the active window associated with the data filter. Can anyone please help. Thanks,

Current Data Table() << Data Filter(
Add Filter(
columns( :PartNo, :Spec ),
Where( :PartNo == "12345" ),
Where( :Spec == "Spec1" ),

//Display( :PartNo, Size( 221, 259 ), List Display ),
//Display( :Spec, Size( 221, 259 ), List Display )
),
Mode( Show( 1 ), Include( 1 ) ),
Close Window;
);
3 REPLIES
> Hi folks,
>
> I'm having some difficulty closing the active window
> associated with the data filter. Can anyone please
> help. Thanks,
>
> Current Data Table() << Data Filter(
> Add Filter(
> columns( :PartNo, :Spec ),
> Where( :PartNo == "12345" ),
> Where( :Spec == "Spec1" ),
>
> //Display( :PartNo, Size( 221, 259 ), List Display
> ay ),
> //Display( :Spec, Size( 221, 259 ), List Display )
> ),
> Mode( Show( 1 ), Include( 1 ) ),
> Close Window;
> );

Original code was cut off. I'm reposting it here. Thanks,


)
I am having this EXACT same difficulty. Any advice on how to close the window via script command would be appreciated. I've tried the 'Show Columns Selector' option but this hasn't solved anything.
mpb

Super User

Joined:

Jun 23, 2011

If you are using the Data Filter only to set up exclusions and hidden rows and not to do interactive manipulations you can achieve the same effect without using the Data Filter. The following two code snippets do the same thing to the data table. (note that if :Age were changed to nominal then the Data Filter clause involving :Age could be replaced with :Age == 51). Assumes the Fitness data is current.



dt = Current Data Table();

dt << select where( !(:Sex == "F" & :Age == 51) )
<< Exclude( 1 ) << Hide( 1 );

dt << clear select;



Current Data Table() << Data Filter(

    Add Filter(

        columns(
:Sex, :Age ),

        Where(
:Sex == "F" ),

        Where(
:Age <= 51 & :Age >= 51)

    ),

    Mode( Select( 0 ), Show( 1 ), Include( 1
) )

);