cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit. Register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
Woodrat
Level I

JSL to Close Data Filter Window

Howdy, I am trying to include in my script a line at the end that will close the data filter window once it has completed its action. The script right now will open a data filter and apply the filter I want to the target column but I can't figure out how to then get the data filter window to close. I'm not sure if it's even possible, but seems like it would be given the capabilities of JSL. I can write a line of script to close the current data table just fine, I simply can't figure out how to apply the close feature to the data filter window alone. Many thanks for any input!

4 REPLIES 4
mmarchandFSLR
Level III

Re: JSL to Close Data Filter Window

Something like this?

 

Names Default to Here( 1 );
df = Current Data Table() << Data Filter;
Wait( 2 );
( df << Get Window ) << Close;
txnelson
Super User

Re: JSL to Close Data Filter Window

Here is what I have come up with

Names Default To Here( 1 );
dt = Current Data Table();
df = dt << Data Filter;
Wait( 2 );
Window( "Data Filter for " || Char( dt << get name ) ) << Close window;

Unless you are interactively changing the Data Filter values there is probably a better way in JSL to perform the tasks.  What specifically are you using the data filter for? 

Jim
mmarchandFSLR
Level III

Re: JSL to Close Data Filter Window

I swear this didn't work when I tried it initially, but, after looking at the Scripting Index, I saw it's valid and tried again.  Probably a typo in my first attempt.

 

Names Default to Here( 1 );
df = Current Data Table() << Data Filter;
Wait( 2 );
df << Close;

 

Re: JSL to Close Data Filter Window

You said, "The script right now will open a data filter and apply the filter I want to the target column but I can't figure out how to then get the data filter window to close." If you are using the filter to select rows, another way without using a data filter object is to use the data table messages. Use the << Select Where( Boolean expression) message to select rows or the << Get Rows Where( Boolean expression) message obtain a list of matching rows.