<?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 Application Current DataTable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Application-Current-DataTable/m-p/344264#M59395</link>
    <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With your help, and many searches and iterations, I'm now close to wrapping-up my first JMP application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still struggling on few points, for which sure someone will suggest easy solutions ;):&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A the end of Dialog1 script, I'm opening a Data Table that was selected by the User&lt;UL&gt;&lt;LI&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;OnNext1 = Function( {},
	file_path = FilePath &amp;lt;&amp;lt; GetText();
	If ( file_path != "",
		//IST Text File
		dt = Open(
			file_path,
			Columns(...)
			...
		);
		...
		
		CurrentDataTable( dt );
		Dialog2 &amp;lt;&amp;lt; CreateInstance( dt );
	)&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;But I'd never get the&amp;nbsp;CurrentDataTable correctly set when reaching Dialog2&lt;/LI&gt;&lt;LI&gt;Can be seen after filling the File Path field and pressing "Next":&lt;BR /&gt;Dialog2 Tiltle = ^APPNAME - ^TABLENAME&lt;BR /&gt;shows no Table Name, or another preloaded DataTable name :(&lt;/img&gt;&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dialog2_CurrentDataTable.png" style="width: 293px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29099i47C7E8EE413A080C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dialog2_CurrentDataTable.png" alt="Dialog2_CurrentDataTable.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;This next issue would supposedly be fixed by the previous one:&lt;UL&gt;&lt;LI&gt;A the end of Dialog2 script, I'm willing to Append all Columns starting with a given string, to the Dialog2 Col List Box.&lt;/LI&gt;&lt;LI&gt;It currently remains deperately empty, certainly due to issue #1&lt;/LI&gt;&lt;LI&gt;Plus getting following errors:&lt;UL&gt;&lt;LI&gt;Send Expects Scriptable Object 22 times in access or evaluation of 'Send' , ColList1 &amp;lt;&amp;lt; /*###*/Background Color( 2147483647 ) /*###*/&lt;BR /&gt;Send Expects Scriptable Object 3 times in access or evaluation of 'Send' , ColList1 &amp;lt;&amp;lt; /*###*/Set Data Type( "numeric" ) /*###*/&lt;BR /&gt;Send Expects Scriptable Object in access or evaluation of 'Send' , ColList1 &amp;lt;&amp;lt; /*###*/Get Items/*###*/&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Whatever happens on Dialog2, if I now press "OK", I'm getting the following error, related to calculated Custom Quantile variables used in Module "Report1":&lt;UL&gt;&lt;LI&gt;Invalid matrix token.&lt;BR /&gt;Line 69 Column 41: ...les( ( Percent1 /100 ), [►( Percent1 /100 ), ( Perc...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:24:12 GMT</pubDate>
    <dc:creator>HubP_SDe</dc:creator>
    <dc:date>2023-06-10T23:24:12Z</dc:date>
    <item>
      <title>Application Current DataTable</title>
      <link>https://community.jmp.com/t5/Discussions/Application-Current-DataTable/m-p/344264#M59395</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With your help, and many searches and iterations, I'm now close to wrapping-up my first JMP application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still struggling on few points, for which sure someone will suggest easy solutions ;):&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A the end of Dialog1 script, I'm opening a Data Table that was selected by the User&lt;UL&gt;&lt;LI&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;OnNext1 = Function( {},
	file_path = FilePath &amp;lt;&amp;lt; GetText();
	If ( file_path != "",
		//IST Text File
		dt = Open(
			file_path,
			Columns(...)
			...
		);
		...
		
		CurrentDataTable( dt );
		Dialog2 &amp;lt;&amp;lt; CreateInstance( dt );
	)&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;But I'd never get the&amp;nbsp;CurrentDataTable correctly set when reaching Dialog2&lt;/LI&gt;&lt;LI&gt;Can be seen after filling the File Path field and pressing "Next":&lt;BR /&gt;Dialog2 Tiltle = ^APPNAME - ^TABLENAME&lt;BR /&gt;shows no Table Name, or another preloaded DataTable name :(&lt;/img&gt;&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dialog2_CurrentDataTable.png" style="width: 293px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29099i47C7E8EE413A080C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dialog2_CurrentDataTable.png" alt="Dialog2_CurrentDataTable.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;This next issue would supposedly be fixed by the previous one:&lt;UL&gt;&lt;LI&gt;A the end of Dialog2 script, I'm willing to Append all Columns starting with a given string, to the Dialog2 Col List Box.&lt;/LI&gt;&lt;LI&gt;It currently remains deperately empty, certainly due to issue #1&lt;/LI&gt;&lt;LI&gt;Plus getting following errors:&lt;UL&gt;&lt;LI&gt;Send Expects Scriptable Object 22 times in access or evaluation of 'Send' , ColList1 &amp;lt;&amp;lt; /*###*/Background Color( 2147483647 ) /*###*/&lt;BR /&gt;Send Expects Scriptable Object 3 times in access or evaluation of 'Send' , ColList1 &amp;lt;&amp;lt; /*###*/Set Data Type( "numeric" ) /*###*/&lt;BR /&gt;Send Expects Scriptable Object in access or evaluation of 'Send' , ColList1 &amp;lt;&amp;lt; /*###*/Get Items/*###*/&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Whatever happens on Dialog2, if I now press "OK", I'm getting the following error, related to calculated Custom Quantile variables used in Module "Report1":&lt;UL&gt;&lt;LI&gt;Invalid matrix token.&lt;BR /&gt;Line 69 Column 41: ...les( ( Percent1 /100 ), [►( Percent1 /100 ), ( Perc...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:24:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Application-Current-DataTable/m-p/344264#M59395</guid>
      <dc:creator>HubP_SDe</dc:creator>
      <dc:date>2023-06-10T23:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Application Current DataTable</title>
      <link>https://community.jmp.com/t5/Discussions/Application-Current-DataTable/m-p/344359#M59403</link>
      <description>&lt;P&gt;Keep the data table reference in a variable (dt in your example) and always use dt:col (etc) to reference a column. Don't depend on the current data table; the current data table changes when the user clicks any table, and possibly when any new window opens.&lt;/P&gt;&lt;P&gt;The error "&lt;SPAN&gt;Send Expects Scriptable Object&lt;/SPAN&gt;" could explain itself better. &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/1893"&gt;@Audrey_Shull&lt;/a&gt;&amp;nbsp;. The &amp;lt;&amp;lt; operator is the send operator. The left hand side should be an object and the right hand side a message for the object to process.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myobject &amp;lt;&amp;lt; message( ... );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The error means the left hand side is not an object that accepts messages (a scriptable object). "myobject" isn't what you expect. Try&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;show(myobject);
or
show(type(myobject));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to get some idea what is going on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 17:43:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Application-Current-DataTable/m-p/344359#M59403</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-12-25T17:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Application Current DataTable</title>
      <link>https://community.jmp.com/t5/Discussions/Application-Current-DataTable/m-p/345281#M59569</link>
      <description>&lt;P&gt;Thanks Mark,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If you take a closer look at the end of "Dialog1" script, you'll see that I'm passing the "dt" reference to "Dialog2", which I'm then using in the code explicitly.&lt;UL&gt;&lt;LI&gt;Neither this, not the CurrentDataTable command, seem to populate the "&lt;SPAN&gt;^TABLENAME" global reference in the "Dialog2" Title field.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;I tried "^APPNAME - ^dt", but "^dt" is then displayed as a raw string&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dialog2_TableName.PNG" style="width: 231px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29166i571A1DE62778F7AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dialog2_TableName.PNG" alt="Dialog2_TableName.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;I also tried to add "TABLENAME = dt;" in "Dialog2" "OnModuleLoad", but nothing changes in Dialog2 windows title: TABLENAME remains empty&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Dealing with the "scripting object" error, I suspect it is related to the ColList object of "Dialog2" apparently being null a the Table is not yet open at app launch.&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;I suppose I'll have to create the Col List Box dynamically in script to work this around.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 11:05:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Application-Current-DataTable/m-p/345281#M59569</guid>
      <dc:creator>HubP_SDe</dc:creator>
      <dc:date>2021-01-04T11:05:30Z</dc:date>
    </item>
  </channel>
</rss>

