<?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: Subset By and accessing the :col values used in the subset in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525927#M75031</link>
    <description>&lt;P&gt;Thanks again Jim!&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jul 2022 17:42:43 GMT</pubDate>
    <dc:creator>johnm</dc:creator>
    <dc:date>2022-07-25T17:42:43Z</dc:date>
    <item>
      <title>Subset By and accessing the :col values used in the subset</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525847#M75025</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When subset by is performed, the Table Panel will show the :cols and their values for the given subset data table.&lt;/P&gt;
&lt;P&gt;How does user access this information using script command?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mysubdt = mymaindt &amp;lt;&amp;lt; Subset (by ( :first_var, :sec_var, :third_var));&amp;nbsp; // each var has multiple levels, aka several values.&amp;nbsp;
// then mysubdt[1] through mysubdt[n] with n being the number of subset data tables created.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For each mysubdt[i], the Panel would show for example for one of the subset data tables:&lt;/P&gt;
&lt;P&gt;first_var&amp;nbsp; &amp;nbsp; &amp;nbsp; abc&lt;/P&gt;
&lt;P&gt;sec_var&amp;nbsp; &amp;nbsp; &amp;nbsp; xyz&lt;/P&gt;
&lt;P&gt;third_var&amp;nbsp; &amp;nbsp; &amp;nbsp;123&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The objective here is to then save each mysubdt[i] by doing a save that uses these variables' values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mysubdt[1] &amp;lt;&amp;lt; save ("dt_abc_xyz_123.jmp");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just can't seem yet to find this table property information.&lt;/P&gt;
&lt;P&gt;Other approaches?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;John&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:51:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525847#M75025</guid>
      <dc:creator>johnm</dc:creator>
      <dc:date>2023-06-10T23:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Subset By and accessing the :col values used in the subset</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525878#M75026</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x=dt&amp;lt;&amp;lt;get table variable("first_var")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jul 2022 16:42:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525878#M75026</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-25T16:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Subset By and accessing the :col values used in the subset</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525893#M75027</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for quick reply!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I subsequently create a string and filename variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fld1 = mysubdtt[1] &amp;lt;&amp;lt; get table variable ("first_var");
fld2 = mysubdtt[1] &amp;lt;&amp;lt; get table variable ("sec_var");
fld3 = mysubdtt[1] &amp;lt;&amp;lt; get table variable ("third_var");

filename = "dt_"||(fld1)||"_"||(fld2)||"_"||(fld3);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in an attempt to then save as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mysubdtt[1] &amp;lt;&amp;lt; save ("$mypath\$filename.jmp");&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but not quite working as the file saved to the mypath is "$filename.jmp".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;John&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 17:04:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525893#M75027</guid>
      <dc:creator>johnm</dc:creator>
      <dc:date>2022-07-25T17:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Subset By and accessing the :col values used in the subset</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525904#M75028</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mysubdtt[1] &amp;lt;&amp;lt; save ("$mypath\" || filename || ".jmp");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jul 2022 17:06:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525904#M75028</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-25T17:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Subset By and accessing the :col values used in the subset</title>
      <link>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525927#M75031</link>
      <description>&lt;P&gt;Thanks again Jim!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 17:42:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Subset-By-and-accessing-the-col-values-used-in-the-subset/m-p/525927#M75031</guid>
      <dc:creator>johnm</dc:creator>
      <dc:date>2022-07-25T17:42:43Z</dc:date>
    </item>
  </channel>
</rss>

