<?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 Select Rows Based on Another Summary Data Table Each Row of Multiple Column Values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417543#M66666</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am facing issue to write a code to select rows based on another summary data table each row of multiple column values. The summary data table is variable, change from time to time.&lt;/P&gt;&lt;P&gt;Below is JSL code. It does not work as required.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example,&lt;/P&gt;&lt;P&gt;In summary data table,&lt;/P&gt;&lt;P&gt;row#1, Make = Acura, Model =Integra, Protection = manual belts, base on these values select rows in Data Table A.&lt;/P&gt;&lt;P&gt;row#2, Make = Audi, Model =80, Protection = manual belts, base on these values select rows in Data Table A.&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;: so on....until complete each of row of summary table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cars.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35729iC7B69DF162C1D089/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cars.PNG" alt="Cars.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$TEMP/Cars.jmp");
dt1 = Open("$TEMP/Summary Cars.jmp");

For(i = 1, i &amp;lt;= N Rows(dt1), i++,
	dt &amp;lt;&amp;lt; Select Where (:Make == :Make[i]&amp;amp; :Model == :Model[i] &amp;amp; :Protection == :Protection[i])
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 19:56:33 GMT</pubDate>
    <dc:creator>Lino</dc:creator>
    <dc:date>2023-06-09T19:56:33Z</dc:date>
    <item>
      <title>Select Rows Based on Another Summary Data Table Each Row of Multiple Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417543#M66666</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am facing issue to write a code to select rows based on another summary data table each row of multiple column values. The summary data table is variable, change from time to time.&lt;/P&gt;&lt;P&gt;Below is JSL code. It does not work as required.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example,&lt;/P&gt;&lt;P&gt;In summary data table,&lt;/P&gt;&lt;P&gt;row#1, Make = Acura, Model =Integra, Protection = manual belts, base on these values select rows in Data Table A.&lt;/P&gt;&lt;P&gt;row#2, Make = Audi, Model =80, Protection = manual belts, base on these values select rows in Data Table A.&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;: so on....until complete each of row of summary table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cars.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35729iC7B69DF162C1D089/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cars.PNG" alt="Cars.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$TEMP/Cars.jmp");
dt1 = Open("$TEMP/Summary Cars.jmp");

For(i = 1, i &amp;lt;= N Rows(dt1), i++,
	dt &amp;lt;&amp;lt; Select Where (:Make == :Make[i]&amp;amp; :Model == :Model[i] &amp;amp; :Protection == :Protection[i])
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:56:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417543#M66666</guid>
      <dc:creator>Lino</dc:creator>
      <dc:date>2023-06-09T19:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select Rows Based on Another Summary Data Table Each Row of Multiple Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417565#M66667</link>
      <description>&lt;P&gt;If you just run the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tables=&amp;gt;Summary&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and specify Make, Model and Protection as Group variables, and you select "Link to original data table", you will get a summary data table that when rows are selected in the summary table, the matching rows in the original table are selecte&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1631519845169.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35730i5796FA8FE9F71A2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1631519845169.png" alt="txnelson_0-1631519845169.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 07:57:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417565#M66667</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-09-13T07:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Select Rows Based on Another Summary Data Table Each Row of Multiple Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417588#M66669</link>
      <description>&lt;P&gt;The summary data table is variable. It is different from time to time. It is not part of data table A. I cannot run&amp;nbsp;&lt;SPAN&gt;Tables=&amp;gt;Summary.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need to write to code based on each rows column values in summary data table to select another data table rows which match the criteria&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 08:19:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417588#M66669</guid>
      <dc:creator>Lino</dc:creator>
      <dc:date>2021-09-13T08:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select Rows Based on Another Summary Data Table Each Row of Multiple Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417678#M66678</link>
      <description>&lt;P&gt;Here is an example that uses all of the columns in the summary table in the Select Where executions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Data Table( "Cars" );
dt1 = Data Table( "Summary Cars" );

// Build the Select Where statement
// Get the columns to select on
theCols = dt1 &amp;lt;&amp;lt; get column names( string );
dt &amp;lt;&amp;lt; clear select;
theStatement = " dt &amp;lt;&amp;lt; Select Where( dt:" || theCols[1] || " == dt1:" || theCols[1] || "[i]";
For( k = 2, k &amp;lt;= N Items( theCols ), k++,
	theStatement = theStatement || " &amp;amp; dt:" || theCols[k] || " == dt1:" || theCols[k] || "[i]"
);
theStatement = theStatement || ", current selection( \!"extend\!" ) );";

// Execute the Select Where clauses
For( i = 1, i &amp;lt;= N Rows( dt1 ), i++,
	Eval( Parse( theStatement ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Sep 2021 12:57:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417678#M66678</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-09-13T12:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select Rows Based on Another Summary Data Table Each Row of Multiple Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417733#M66690</link>
      <description>&lt;P&gt;Jim, Thank You.&lt;/P&gt;&lt;P&gt;It works perfectly.&lt;/P&gt;&lt;P&gt;You make my day.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 14:11:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/417733#M66690</guid>
      <dc:creator>Lino</dc:creator>
      <dc:date>2021-09-13T14:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select Rows Based on Another Summary Data Table Each Row of Multiple Column Values</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/562956#M77606</link>
      <description>&lt;P&gt;You made my day too. Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 15:52:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Rows-Based-on-Another-Summary-Data-Table-Each-Row-of/m-p/562956#M77606</guid>
      <dc:creator>Ressel</dc:creator>
      <dc:date>2022-11-01T15:52:24Z</dc:date>
    </item>
  </channel>
</rss>

