How to close associated data table with a warning, when chart window is closed ?I want to show a dialog to the user when a chart window is closed "Warning: This will close the associated data table!" and close the data table (with No Save) if the user selects OK and keep both the data table and the chart based on it, if the user selects "Cancel".
The script below is for the dialog box I want, but where do I need to put the statement for closing [if OK] or keeping [if Cancel] the data table?
gb << On Close(
New Window( "Are you sure?",
<<MODAL></MODAL>
Automation and ScriptingRe: How to close associated data table with a warning, when chart window is closed ?<< on close()
is the right place.
Return 0 if the window should not be closed.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Graph Builder(
<<ON close=""></ON>
Re: How to close associated data table with a warning, when chart window is closed ?@hogi . I get the following on JMP 16.2.0.
Cannot subscript Display Box in access or evaluation of 'ex[ /*###*/"button"]' , ex[/*###*/"button"]Cannot subscript Display Box in access or evaluation of 'ex[ /*###*/"button"]' , ex[/*###*/"button"]
Re: How to close associated data table with a warning, when chart window is closed ?Any reason why you don't use the free upgrade to jmp17?
The new Workflow Builder is really great 
Here a version with
<<MODAL></MODAL>
which should work on Jmp 16.2
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder(
<<ON close=""></ON>
Re: How to close associated data table with a warning, when chart window is closed ?@hogi Thanks, it works with << modal.
Any reason why you don't use the free upgrade to jmp17?
We normally test a newer JMP version (for a set duration) on existing JMP scripts before deploying it more widely.
There have been had several backward compatibility issues in the past some of which have not yet been resolved yet.
(I am still learning JMP but there are others who do the testing)
So, the upshot is we will move to v17 but it wont happen anytime soon so I only have v16.2 at my disposal at the moment
.