Multiple data tables openHey,
I have a script that produces an output of 3 different data tables, each displaying unique data. Upon completion of the script, the 3 tables pop up separatley, bombarding the user with them. Is there anyway these 3 tables can be displayed in neater way, or even all under tha same window?
Thanks!
Matt
Re: Multiple data tables openThis is perfect!! Thank you so much !
Re: Multiple data tables openHi @matt7109,
The menu and toolbars you see are limited to one per window. You will need to create your own custom behaviors for actions (like save) that would typically be done using the menu or toolbars.
The below script creates a red triangle menu that will save the data table within the Outline Box. Notice that I turned on the "Data Table List" in the toolbar so that you can see the current data table. With this method, you can still use the menus (Tables, DOE, Analyze, Graph) that will perform actions on the current data table shown in the data table list.
Names Default To Here( 1 );
// open the tables as private
dt1 = Open( "$SAMPLE_DATA\Big Class.jmp", private );
dt2 = Open( "$SAMPLE_DATA\Bands Data.jmp", private );
// Create a function to create each data table to reduce code redundancy
getDataTableOutlineBox = Function( {dt},
Eval(
Eval Expr(
Outline Box( dt << Get Name, // title of the tab
dt << New Data Box(), //DataBrowserBox
// Add scripts to the Red Triangle menu for the Outline Box
<<SET menu="" script=""></SET>
Below is a screenshot of the window after clicking on the Red Triangle Menu.

Re: Multiple data tables openI like this solution a lot as it's all in one window. However, is there any way to make this sort of display in a JMP table window where the user can save the file, rather than in a window?
Re: Multiple data tables openPerfect!! Thanks!
Re: Multiple data tables openIf you wanted a way to show the interactive data tables in the same window, you could use the New Data Box() message to create a DataBrowserBox for each of the tables. See my example below for details.
Names Default To Here( 1 );
// open the tables as invisible
dt1 = Open( "$SAMPLE_DATA\Big Class.jmp", invisible );
dt2 = Open( "$SAMPLE_DATA/Bands Data.jmp", Invisible );
// Create a window with both tables shown
New Window( "Both Tables",
<<ONCLOSE></ONCLOSE>
The resulting window:

Re: Multiple data tables openFor 'the same window' part, you could try something like:
NamesDefaultToHere(1);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp", Invisible);
dt2 = Open("$SAMPLE_DATA/Bands Data.jmp", Invisible);
win = NewWindow("Both Tables", << OnClose(onCloseScript),
PanelBox(dt1 << getName, DataTableBox(dt1)),
PanelBox(dt2 << getName, DataTableBox(dt2))
);
onCloseScript = Expr(Close(dt1, NoSave); Close(dt2, NoSave));Re: Multiple data tables openYou can make them Invisible or Private data tables, or you can Minimize them. Go to
Help==>Scripting Index==>Data Table
to see examples of how to do these