cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
alanpaone
Level I

Closing tables without saving

I have a couple of frustrations with closing data tables.

1) if I try to close tables from the taskbar, JMP will ask every time if I want to Hide Data Table, or just close all the associated charts and reports, then separately ask if i really want to close the table without saving. is there any option to get rid of either of these dialogs? I understand that a program would want to warn a user before they close a data table without saving, but I open dozens of tables every day and don't need to save any of them. They open via a jsl script, so if I can add something to the script to not ask when I close them, that's great, but I am not closing them with a script so "Close( dt, No Save)" is sadly not the only answer I need.

 

2) If I select the tables I want to close from the Home window, I can close them all and Save None, which is great, but then all the charts, reports, and graphs associated with them will stay open, orphaned, which seems like it would be a bug. Does anyone know a workaround for this one, aside from clicking on all the graphs in addition to the tables?

1 ACCEPTED SOLUTION

Accepted Solutions
ErraticAttack
Level VI

Re: Closing tables without saving

Sorry, typo in the script above, and this only works if closing a window directly, but you may be able to modify it to work in all cases.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "a new column here", "Character" );
dt << On Close(
	window = Current Window();
	table = window[Data Browser Box( 1 )] << Get Data Table;
	(table << Get Windows()) << Close Window();
	Close( table, No Save );
	1
)
Jordan

View solution in original post

5 REPLIES 5
ErraticAttack
Level VI

Re: Closing tables without saving

If you're opening the tables with a script, you can add the following OnClose function to the tables.  Here I open a builtin table and add an on-close statement to close the table without saving -- you should be able to add this to your script without any issues.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "a new column here", "Character" );
dt << On Close(
	window = Current Window();
	table = wnd[Data Browser Box( 1 )] << Get Data Table;
	(table << Get Windows()) << Close Window();
	Close( table, No Save );
	1
)

 

 

There is probably a way to have the window / table variable give a list of attached windows (the charts and such) that you can then close, but I didn't check. 

Jordan
ErraticAttack
Level VI

Re: Closing tables without saving

Sorry, typo in the script above, and this only works if closing a window directly, but you may be able to modify it to work in all cases.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "a new column here", "Character" );
dt << On Close(
	window = Current Window();
	table = window[Data Browser Box( 1 )] << Get Data Table;
	(table << Get Windows()) << Close Window();
	Close( table, No Save );
	1
)
Jordan
alanpaone
Level I

Re: Closing tables without saving

This works perfectly, thanks!

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Closing tables without saving

Another option is to save a script to close the data table when you open it:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Script( "Close without save",
	current data table() << Close Window;
);

ih_0-1620141798019.png

 

KarenC
Super User (Alumni)

Re: Closing tables without saving

Try the File > Close Multiple option from the file menu. You will be presented with a dialog window that lets you pick all or selected files to close. Those that potential need saving have a * and you have options to review or not review.