<?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: In a script, return the selected table scripts as a list in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/544965#M76355</link>
    <description>&lt;P&gt;The localized sample tables are created by the JMP localization team. Tables you create will not have &lt;A href="https://en.wikipedia.org/wiki/Internationalization_and_localization" target="_self"&gt;L10N&lt;/A&gt; data. Your solution is fine for non-sample data tables (any table you create.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keeping only one copy of each sample table makes shipping a new version of JMP every 18 months easier. During the JMP 4 era the sample tables were &lt;STRONG&gt;&lt;EM&gt;cloned&lt;/EM&gt;&lt;/STRONG&gt; and translated, and then updated tables had to be re-translated for JMP 5. What a nightmare!&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 11:10:48 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2022-09-15T11:10:48Z</dc:date>
    <item>
      <title>In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535005#M75743</link>
      <description>&lt;P&gt;Hi, I am aware of using the code below to return all the table scripts&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;scriptNames = dt &amp;lt;&amp;lt; Get Table Script Names;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way to only return the scripts that I have selected (if any are selected, otherwise return all).&lt;/P&gt;&lt;P&gt;So return [Bivariate,Logistic] in the case below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mvanderaa1_0-1660807701175.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44849iBF3709EBDC2F5E84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mvanderaa1_0-1660807701175.png" alt="mvanderaa1_0-1660807701175.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:07:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535005#M75743</guid>
      <dc:creator>mvanderaa1</dc:creator>
      <dc:date>2023-06-09T17:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535020#M75744</link>
      <description>&lt;P&gt;This illustrates how to get the script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/Big Class.jmp");
scriptNames = dt &amp;lt;&amp;lt; get table script names;

// as an example, get the first script
scriptName = scriptNames[1];
script = dt &amp;lt;&amp;lt; get table variable(scriptName);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The script comes back as a string.&amp;nbsp; You can use parse to convert it to executable JSL.&lt;/P&gt;
&lt;P&gt;To work with selected scripts try the &lt;STRONG&gt;GetSelectedProperties&lt;/STRONG&gt; message.&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 07:41:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535020#M75744</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2022-08-18T07:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535023#M75745</link>
      <description>&lt;P&gt;&amp;lt;&amp;lt; Get Selected Properties seems to do the trick &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/data-tables-2.shtml?os=win&amp;amp;source=application#ww2329542" target="_blank" rel="noopener"&gt;dt&amp;lt;&amp;lt;Get Selected Properties(&amp;lt;{list of properties}&amp;gt;)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; Select Properties({2, 4});
proplist = dt &amp;lt;&amp;lt; Get Selected Properties();&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Aug 2022 07:41:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535023#M75745</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-08-18T07:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535856#M75811</link>
      <description>&lt;P&gt;To clarify, the selected scripts are variable. So an answer with hard coded script indices is not what I'm looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, I want to first determine WHICH scripts I have selected and then return those.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 07:20:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535856#M75811</guid>
      <dc:creator>mvanderaa1</dc:creator>
      <dc:date>2022-08-22T07:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535858#M75813</link>
      <description>&lt;P&gt;There are no hard-coded indices. Selection of properties is there for demonstration purposes, but maybe this is more suited for you (it will return Empty() as nothing is selected):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
proplist = dt &amp;lt;&amp;lt; Get Selected Properties();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;lt;&amp;lt; Get Selected Properties won't directly return you with the names of the scripts but you can fairly easily get the names from what it returns by using Arg() for example.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 07:56:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535858#M75813</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-08-22T07:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535859#M75814</link>
      <description>&lt;P&gt;The information is contained in the results from &lt;STRONG&gt;get selected properties&lt;/STRONG&gt;, but you might have to do some work to unpick the information.&amp;nbsp; Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// example from the scripting guide

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Select Properties( {2, 4} );
proplist = dt &amp;lt;&amp;lt; Get Selected Properties();

// number of selected scripts

numSelectedScripts = nitems(proplist);

// pattern for picking out the script name

pat = "\!"en\!" =&amp;gt; \!"" + PatArb()&amp;gt;&amp;gt;strScriptName + "\!"";

// build list of script names based on selection

lstScriptNames = {};

for (i=1,i&amp;lt;=numSelectedScripts,i++,
	
	strScriptName = char(proplist[i]);
	success = PatMatch(strScriptName,pat);
	if (success,
		insertinto(lstScriptNames,strScriptName)
	)
	
);

show(lstScriptNames);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2022 08:45:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/535859#M75814</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2022-08-22T08:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/544928#M76351</link>
      <description>&lt;P&gt;That is perfect! Thanks for the detailed solution&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 07:50:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/544928#M76351</guid>
      <dc:creator>mvanderaa1</dc:creator>
      <dc:date>2022-09-15T07:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/544931#M76354</link>
      <description>&lt;P&gt;I see now that in my own datatables the specific extraction you're using to get the English script name is not working. I do not have the multi-language structure that I see in the big class datatable. Is this something that changed recently, or possibly some language setting within JMP that causes it to be different between systems?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've changed your pat variable to be like this to make it work for me.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pat = "\!"" + Pat Arb() &amp;gt;&amp;gt; strScriptName + "\!"";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2022 09:05:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/544931#M76354</guid>
      <dc:creator>mvanderaa1</dc:creator>
      <dc:date>2022-09-15T09:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: In a script, return the selected table scripts as a list</title>
      <link>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/544965#M76355</link>
      <description>&lt;P&gt;The localized sample tables are created by the JMP localization team. Tables you create will not have &lt;A href="https://en.wikipedia.org/wiki/Internationalization_and_localization" target="_self"&gt;L10N&lt;/A&gt; data. Your solution is fine for non-sample data tables (any table you create.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keeping only one copy of each sample table makes shipping a new version of JMP every 18 months easier. During the JMP 4 era the sample tables were &lt;STRONG&gt;&lt;EM&gt;cloned&lt;/EM&gt;&lt;/STRONG&gt; and translated, and then updated tables had to be re-translated for JMP 5. What a nightmare!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 11:10:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/In-a-script-return-the-selected-table-scripts-as-a-list/m-p/544965#M76355</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-09-15T11:10:48Z</dc:date>
    </item>
  </channel>
</rss>

