JSL to Close Data Filter WindowHowdy, 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!
Automation and ScriptingRe: JSL to Close Data Filter WindowSomething like this?
Names Default to Here( 1 );
df = Current Data Table() << Data Filter;
Wait( 2 );
( df << Get Window ) << Close;
Re: JSL to Close Data Filter WindowHere 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?
Re: JSL to Close Data Filter WindowI 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 WindowYou 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.
Re: JSL to Close Data Filter WindowThat worked a treat! Thanks for the input, I greatly appreciate it!
A bit of background: I'm using this script as a tool to identify CV values above a certain percentage. There are a number of folks I work with that have JMP but not the level of experience that my self (and one other whom I work with) have, so by creating a script, I can give this to them and they can quickly and easily identify assays with CV outliers. It shouldn't need to be a dynamic filter since it's filtering for a hard cutoff. I just didn't want the data filter window sticking around for anyone to edit or offer up greater confusion. Many thanks for the answer.
Re: JSL to Close Data Filter WindowIn JMP Scripting Language (JSL), the Data Filter window can be closed programmatically by referencing the filter object and sending it a close message. This is particularly useful when automating data analysis workflows, such as managing datasets related to customer trends, operational performance, or industries like automatic driving lessons Glasgow providers. By identifying the active Data Filter associated with a data table or report and executing a command such as Close Window() on the filter reference, users can ensure that filter windows are automatically closed once a script has completed, helping to maintain an organized and efficient analysis environment.