<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Multiple data tables open in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41850#M24415</link>
    <description>&lt;P&gt;For 'the same window' part, you could try something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp", Invisible);
dt2 = Open("$SAMPLE_DATA/Bands Data.jmp", Invisible);

win = NewWindow("Both Tables", &amp;lt;&amp;lt; OnClose(onCloseScript), 
		PanelBox(dt1 &amp;lt;&amp;lt; getName, DataTableBox(dt1)),
		PanelBox(dt2 &amp;lt;&amp;lt; getName, DataTableBox(dt2))
	);
onCloseScript = Expr(Close(dt1, NoSave); Close(dt2, NoSave));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Jul 2017 14:24:56 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2017-07-12T14:24:56Z</dc:date>
    <item>
      <title>Multiple data tables open</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41846#M24411</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;way, or even all under tha same window?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 13:26:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41846#M24411</guid>
      <dc:creator>matt7109</dc:creator>
      <dc:date>2017-07-12T13:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple data tables open</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41848#M24413</link>
      <description>&lt;P&gt;You can make them Invisible or Private data tables, or you can Minimize them. &amp;nbsp;Go to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index==&amp;gt;Data Table&lt;/P&gt;
&lt;P&gt;to see examples of how to do these&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 13:32:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41848#M24413</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-07-12T13:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple data tables open</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41850#M24415</link>
      <description>&lt;P&gt;For 'the same window' part, you could try something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp", Invisible);
dt2 = Open("$SAMPLE_DATA/Bands Data.jmp", Invisible);

win = NewWindow("Both Tables", &amp;lt;&amp;lt; OnClose(onCloseScript), 
		PanelBox(dt1 &amp;lt;&amp;lt; getName, DataTableBox(dt1)),
		PanelBox(dt2 &amp;lt;&amp;lt; getName, DataTableBox(dt2))
	);
onCloseScript = Expr(Close(dt1, NoSave); Close(dt2, NoSave));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2017 14:24:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41850#M24415</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-07-12T14:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple data tables open</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41885#M24429</link>
      <description>&lt;P&gt;If 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.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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",
	&amp;lt;&amp;lt;OnClose(
		Try( Close( dt1, NoSave ) );
		Try( Close( dt2, NoSave ) );
	),
	H Splitter Box(
		size( 1200, 800 ),
		a = dt1 &amp;lt;&amp;lt; New Data Box(), // Returns DataBrowserBox
		b = dt2 &amp;lt;&amp;lt; New Data Box()  // Returns DataBrowserBox
	)
);

// Close the side panels for both tables
a &amp;lt;&amp;lt; close side panels();
b &amp;lt;&amp;lt; close side panels();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The resulting window:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6757i9DB94A9876BBC4C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 19:53:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41885#M24429</guid>
      <dc:creator>Justin_Chilton</dc:creator>
      <dc:date>2017-07-12T19:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple data tables open</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41888#M24432</link>
      <description>&lt;P&gt;Perfect!! Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 20:42:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41888#M24432</guid>
      <dc:creator>matt7109</dc:creator>
      <dc:date>2017-07-12T20:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple data tables open</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41895#M24438</link>
      <description>&lt;P&gt;I 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?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 21:47:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41895#M24438</guid>
      <dc:creator>matt7109</dc:creator>
      <dc:date>2017-07-12T21:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple data tables open</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41934#M24463</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/8828"&gt;@matt7109&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;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 &amp;lt;&amp;lt; Get Name, // title of the tab
				dt &amp;lt;&amp;lt; New Data Box(), //DataBrowserBox
				// Add scripts to the Red Triangle menu for the Outline Box
				&amp;lt;&amp;lt;Set Menu Script(
					{
						"Save As", // Name of the menu item script
						
						// get path to save the data table
						savePath = Pick File(
							"Save JMP Data Table",
							"",
							{"JMP Files|jmp", "All Files|*"},
							1,
							1,
							Expr( dt &amp;lt;&amp;lt; get name ) || ".jmp" // evaluate the name of the table when the menu script is added
						);
						// If the user selected a path, save the table at that path
						If( savePath != "",
							Expr( dt ) &amp;lt;&amp;lt; save( savePath )
						); 
					
					}
				)
			)
		)
	)
);

// (optional) Turn on the Data Table list for reports so that you can see what the current data table is
Set Toolbar Visibility( "Data Table List", Report, true );

// Create a window with both tables shown
New Window( "Both Tables",
	Suppress AutoHide( 1 ), // Suppress the auto hide so that the toolbars appear
	&amp;lt;&amp;lt;OnClose(
		Try( Close( dt1, NoSave ) );
		Try( Close( dt2, NoSave ) );
	),
	H Splitter Box(
		size( 1200, 800 ),
		getDataTableOutlineBox( dt1 ),
		getDataTableOutlineBox( dt2 ),

	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Below is a screenshot of the window after clicking on the Red Triangle Menu.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-07-13_12-44-55.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6766i6D8546FF86D4287E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-07-13_12-44-55.png" alt="2017-07-13_12-44-55.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 17:02:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41934#M24463</guid>
      <dc:creator>Justin_Chilton</dc:creator>
      <dc:date>2017-07-13T17:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple data tables open</title>
      <link>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41938#M24466</link>
      <description>&lt;P&gt;This is perfect!! Thank you so much !&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 17:26:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Multiple-data-tables-open/m-p/41938#M24466</guid>
      <dc:creator>matt7109</dc:creator>
      <dc:date>2017-07-13T17:26:59Z</dc:date>
    </item>
  </channel>
</rss>

