<?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: Select Where: need to select from current selection in JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4110#M4110</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can we get this updated in the Scripting Guide?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Scripting Guide page 336&lt;/P&gt;&lt;P&gt;dt = Open( "$SAMPLE_DATA\Big Class.jmp" );&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( age &amp;lt; 15 &amp;amp; sex == "F" );&lt;/P&gt;&lt;P&gt;//or&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( age == 14 );&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Extend Select Where( sex == "F" ); //does nothing&lt;/P&gt;&lt;P&gt;wait(10);&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( sex == "F", Current Selection ("extend")); //extends select&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Sep 2015 15:15:15 GMT</pubDate>
    <dc:creator>msharp</dc:creator>
    <dc:date>2015-09-04T15:15:15Z</dc:date>
    <item>
      <title>Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4102#M4102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to select rows from a data set where I have multiple conditions, but instead of using a single select where statement with "and," I want to loop through my conditions one at a time, selecting from the current selection. This is very straightforward in the select where window (use "select from current selection"). How can I do this in JSL?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I have a list of column names cnames = {"Col1", "Col2", "Col3"} and a list of values cspecs = {"a", "b","c} and I want to select the rows from my data table where Col1 = a, Col2 = b, and Col3 = c. I will loop through the items in cnames and tell it to select from the current selection each time. Thanks!&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;dt&amp;lt;&amp;lt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;select where(as column(cnames&lt;I&gt;)==cspecs&lt;I&gt;) &lt;/I&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 21:39:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4102#M4102</guid>
      <dc:creator>katief</dc:creator>
      <dc:date>2011-12-07T21:39:08Z</dc:date>
    </item>
    <item>
      <title>Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4103#M4103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One could use a list of currently selected rows as part of the condition of Select Where(). The list can be updated with each iteration as in the example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #a70096;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2600eb;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"$ENGLISH_SAMPLE_DATA/Big Class.jmp"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #a70096;"&gt;&lt;SPAN style="color: #000000;"&gt;cnames &lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;"age"&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"height"&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"weight"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;cspecs &lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;15&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;62&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;100&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;dt &lt;SPAN style="color: #150097;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; select all rows&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;&lt;SPAN style="color: #2600eb;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; i &lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; i &lt;SPAN style="color: #150097;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2600eb;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; cnames &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #150097;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;selected_rows &lt;SPAN style="color: #150097;"&gt;=&lt;/SPAN&gt; dt &lt;SPAN style="color: #150097;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; get selected rows&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dt &lt;SPAN style="color: #150097;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; select where&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #2600eb;"&gt;And&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #2600eb;"&gt;As Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; cnames&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)[]&lt;/STRONG&gt; &lt;SPAN style="color: #150097;"&gt;&amp;lt;&lt;/SPAN&gt; cspecs&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #2600eb;"&gt;Contains&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; selected_rows&lt;SPAN style="color: #150097;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #2600eb;"&gt;Row&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #150097;"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="color: #009694;"&gt;&lt;STRONG&gt;0 &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp; )&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #150097;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 23:57:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4103#M4103</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2011-12-07T23:57:46Z</dc:date>
    </item>
    <item>
      <title>Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4104#M4104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you- this will help. I'd done a "for each row" to work around this and that killed my performance. Your suggestion will speed things up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2011 13:50:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4104#M4104</guid>
      <dc:creator>katief</dc:creator>
      <dc:date>2011-12-08T13:50:35Z</dc:date>
    </item>
    <item>
      <title>Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4105#M4105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's probably more efficient to do the SELECT WHERE all at once.&amp;nbsp; I build dynamic select statements all the time and then use eval(parse()) to run them.&amp;nbsp; Here's MS's example modified to do the select where in one go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Open&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"$ENGLISH_SAMPLE_DATA/Big Class.jmp"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;cnames &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"age"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"height"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"weight"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;}&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;cspecs &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;15&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;62&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; font-size: 10pt;"&gt;104&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;select_string &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;""&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;For&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;i &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; i &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;cnames&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; i&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;select_string &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;==&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select_string &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;":"&lt;/SPAN&gt; ||&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; cnames&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/SPAN&gt;|| &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;" == "&lt;/SPAN&gt; || &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;cspecs&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select_string &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; select_string &lt;/SPAN&gt;|| &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;" &amp;amp; "&lt;/SPAN&gt; ||&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;":"&lt;/SPAN&gt; ||&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; cnames&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/SPAN&gt;|| &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;" == "&lt;/SPAN&gt; || &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;cspecs&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;select_string &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"dt &amp;lt;&amp;lt; select where("&lt;/SPAN&gt; ||&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; select_string &lt;/SPAN&gt;|| &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;")"&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;eval&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;parse&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;select_string&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;print&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;select_string&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2011 15:59:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4105#M4105</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2011-12-08T15:59:59Z</dc:date>
    </item>
    <item>
      <title>Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4106#M4106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you!&amp;nbsp; Got a little tricky with character and numeric columns, but it's working and it's a big improvement speedwise from where I was.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2011 17:16:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4106#M4106</guid>
      <dc:creator>katief</dc:creator>
      <dc:date>2011-12-08T17:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4107#M4107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Been searching for a solution to pretty much the exact same issue, and this really is very slick.&amp;nbsp; Not sure why I didn't think of creating a text string to evaluate it before...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 22:28:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4107#M4107</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-07-29T22:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4108#M4108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A For loop should be as fast if not faster then a where clause - but "For Each Row" is horribly slow - use For (i=1,i&amp;lt;=NRows(dt),,i++ instead&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 10:37:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4108#M4108</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2015-07-30T10:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4109#M4109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;JMP 12 offers a new option for Select Where() that allows you to specify whether to to extend, restrict, or clear the current selection. The syntax is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14382610902144272" jivemacro_uid="_14382610902144272" modifiedtitle="true"&gt;&lt;BR /&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( condition, &amp;lt;Current Selection( "extend" | "restrict" | "clear" )&amp;gt; );&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example demonstrates extending the current selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14382606898303173" jivemacro_uid="_14382606898303173" modifiedtitle="true"&gt;&lt;BR /&gt;&lt;P&gt;Names Default To Here( 1 );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( :Age == 14 );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Wait( 1 ); //For demonstration purposes&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where(&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; :sex == "M",&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp; Current Selection( "extend" )&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;);&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wendy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 12:59:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4109#M4109</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2015-07-30T12:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4110#M4110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can we get this updated in the Scripting Guide?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Scripting Guide page 336&lt;/P&gt;&lt;P&gt;dt = Open( "$SAMPLE_DATA\Big Class.jmp" );&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( age &amp;lt; 15 &amp;amp; sex == "F" );&lt;/P&gt;&lt;P&gt;//or&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( age == 14 );&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Extend Select Where( sex == "F" ); //does nothing&lt;/P&gt;&lt;P&gt;wait(10);&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( sex == "F", Current Selection ("extend")); //extends select&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 15:15:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4110#M4110</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-09-04T15:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4111#M4111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;BR /&gt;&lt;P&gt;To select a row without deselecting a previously selected row, combine &amp;lt;&amp;lt; Select Where with&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;&amp;lt; Select Where and the current selection("extend") argument. This is an alternative to&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;using an OR statement.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( age == 14 );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Select Where( sex == "F", current selection("extend"));&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;msharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I am not sure where the syntax you show came from.&amp;nbsp; &lt;/SPAN&gt;The JMP 12.1 Scripting Guide and current online documentation do have the correct text, as shown above.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wendy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 20:47:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/4111#M4111</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2015-09-08T20:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where: need to select from current selection in JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/49952#M28415</link>
      <description>&lt;P&gt;I am trying to work this code that I wrote based on the script here. The Diagnosis columns are character columns and this code is not working. Basically there are three columns in the table, each one with ICD codes. I want to select the cases where it matches ICD codes. It should be any column matching any ICD code hence the nested for loop. The Uncommented code works, but Select string does not have quotation and probably that is why it is not working. How can I fix this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "\Main.jmp" );
　
colnames = {"Diagnosis 1", "Diagnosis 2", "Diagnosis 3"};

ICDcodes = { "7731", "7626", "V3001", "V3000"};

tblname = "Subset.jmp";
/*
dt &amp;lt;&amp;lt; Select Where(
:Diagnosis 1 == "V3001",
Current Selection( "extend" )
);*/

select_string = "";
 
For (i = 1, i &amp;lt;= N Items(colnames), i++,
　
For (j = 1, j &amp;lt;= N Items(ICDcodes), j++,

if (select_string == "",

// then

// select_string = ":" || colnames[i] || " == " || char(ICDcodes[j]);
select_string = ":" || colnames[i] || " == " || char(ICDcodes[j]) ;

// else

,
select_string = select_string || " | " ||

":" || colnames[i] || " == " || char(ICDcodes[j]);
 
);
　
);
);
　
select_string = "dt &amp;lt;&amp;lt; select where(" || select_string || ")";
 
eval(parse(select_string));
 
print(select_string);
 
// Create a subset table with GA &amp;lt;32 weeks.
　
dt &amp;lt;&amp;lt; Subset( Output Table( tblname ), Selected Rows( 1 ), selected columns( 0 ) );
 
dt2 = data table(tblname);
　
dt2 &amp;lt;&amp;lt; save();

//dt &amp;lt;&amp;lt; clear select;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jan 2018 17:59:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-need-to-select-from-current-selection-in-JSL/m-p/49952#M28415</guid>
      <dc:creator>doc4child</dc:creator>
      <dc:date>2018-01-22T17:59:53Z</dc:date>
    </item>
  </channel>
</rss>

