BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
Aziza

Community Trekker

Joined:

Jan 23, 2018

Query Prompts Window-cancel button is not working

Hi all, 

I have a script for a "prompt" filter-based Query Builder. As soon as I run the script, a Query Prompts Window will appear (that's what is wished), but if I click the CANCEL button, it continues running the script which consequently brings to unnecessary data processing. 

Does anyone know how to terminate this process?

Thank you for reading my post! :)

3 REPLIES 3
pmroz

Super User

Joined:

Jun 23, 2011

Re: Query Prompts Window-cancel button is not working

You'll need to share your script if you would like our help :).

Wendy_Murphrey

Joined:

Jun 23, 2011

Re: Query Prompts Window-cancel button is not working

Hello,

 

My initial thought was that the OnRunCanceled() option would catch this condition.  However, it currently is only called when the user clicks Cancel on the progress dialog.  (I have submitted this item to the development team for consideration in a future release of JMP.) 

 

In the meantime, you can check the result that is returned by the query.  For example if you have stored your query in a variable, you could do something like the following to stop the script execution:

status = query << Run Foreground;
If( Is Empty( status ), Stop() );
Print( "next" );

 

I hope this helps!

Wendy
Aziza

Community Trekker

Joined:

Jan 23, 2018

Re: Query Prompts Window-cancel button is not working

Thank you, Wendy.