<?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: Need help with JSL code for table save and close in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46424#M26461</link>
    <description>&lt;P&gt;Not in this case, however, you can actually just embed the second piece of code inside the button box in the first window, and you will get what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Lot_Tracker_window = New Window( "Lot tracker",
	Lot_Tracker = Button Box( "Lot tracker", 
		dt = Open( "C:\Users\user\Documents\Temp\Lot tracker.csv" );
		Lot_Tracker_window &amp;lt;&amp;lt; close window;
		New Window( "Save To Lot Tracker",
			Save_Lot_Tracker = Button Box( "Save To Lot Tracker",
				dt &amp;lt;&amp;lt; save( "C:\Users\user\Documents\Temp\Lot tracker.csv" );
				Quit();
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 26 Oct 2017 13:39:02 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-10-26T13:39:02Z</dc:date>
    <item>
      <title>Need help with JSL code for table save and close</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46419#M26456</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I I'm new to JSL and i&amp;nbsp;need help with the following&amp;nbsp;:&lt;/P&gt;&lt;P&gt;//Open a csv table with a&amp;nbsp;&lt;SPAN&gt;Button Box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lot_Tracker_window=New Window("Lot tracker", Lot_Tracker = Button Box("Lot tracker", dt=open("C:\Users\user\Documents\Temp\Lot tracker.csv")) );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//After i make changes in dt table&amp;nbsp;by aditing the JMP table window. I want to Save&amp;amp;Close my changes to the original file "Lot&amp;nbsp;&lt;SPAN&gt;tracker.csv", by using a new&amp;nbsp;Button Box that i want to popup when i click&amp;nbsp;&amp;nbsp;Lot_Tracker&amp;nbsp;Button Box. what am i doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;New Window("Save To Lot Tracker", Save_Lot_Tracker = Button Box("Save To Lot Tracker", dt &amp;lt;&amp;lt; save("C:\Users\user\Documents\Temp\Lot tracker.csv")));&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Quit()&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 11:25:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46419#M26456</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2017-10-26T11:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with JSL code for table save and close</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46420#M26457</link>
      <description>&lt;P&gt;I believe your issue is that the way you have your code setup, you are assuming that JMP will wait for you to complete each step before moving on.&amp;nbsp; However, the default in JSL is to continue processing further statements, until the code is complete(without pausing).&amp;nbsp; Therefore, your code will pop up the two windows, and then see the Quit() and stop processing.&amp;nbsp; What you need to do, it to do, is to make the first window a Modal window, and then to embed the Quit() function into the second window, so that it will be executed only after the Save button is pushed.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Open a csv table with a Button Box.
 
Lot_Tracker_window = New Window( "Lot tracker",
	modal,
	Lot_Tracker = Button Box( "Lot tracker",
		dt = Open( "C:\Users\user\Documents\Temp\Lot tracker.csv" )
	)
);
 
//After i make changes in dt table by aditing the JMP table window. 
//I want to Save&amp;amp;Close my changes to the original file "Lot tracker.csv", 
//by using a new Button Box that i want to popup when i click  
//Lot_Tracker Button Box. what am i doing wrong?
 
New Window( "Save To Lot Tracker",
	Save_Lot_Tracker = Button Box( "Save To Lot Tracker",
		dt &amp;lt;&amp;lt; save( "C:\Users\user\Documents\Temp\Lot tracker.csv" );
		Quit();
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 12:37:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46420#M26457</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-10-26T12:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with JSL code for table save and close</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46421#M26458</link>
      <description>thx</description>
      <pubDate>Thu, 26 Oct 2017 13:18:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46421#M26458</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2017-10-26T13:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with JSL code for table save and close</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46422#M26459</link>
      <description>&lt;P&gt;Thx for the help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it posible to use the m&lt;SPAN&gt;odal without the OK button?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 13:23:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46422#M26459</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2017-10-26T13:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with JSL code for table save and close</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46424#M26461</link>
      <description>&lt;P&gt;Not in this case, however, you can actually just embed the second piece of code inside the button box in the first window, and you will get what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Lot_Tracker_window = New Window( "Lot tracker",
	Lot_Tracker = Button Box( "Lot tracker", 
		dt = Open( "C:\Users\user\Documents\Temp\Lot tracker.csv" );
		Lot_Tracker_window &amp;lt;&amp;lt; close window;
		New Window( "Save To Lot Tracker",
			Save_Lot_Tracker = Button Box( "Save To Lot Tracker",
				dt &amp;lt;&amp;lt; save( "C:\Users\user\Documents\Temp\Lot tracker.csv" );
				Quit();
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 13:39:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46424#M26461</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-10-26T13:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with JSL code for table save and close</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46425#M26462</link>
      <description>Thx you have been a great help.</description>
      <pubDate>Thu, 26 Oct 2017 14:23:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-with-JSL-code-for-table-save-and-close/m-p/46425#M26462</guid>
      <dc:creator>elad</dc:creator>
      <dc:date>2017-10-26T14:23:02Z</dc:date>
    </item>
  </channel>
</rss>

