<?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 in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/311#M311</link>
    <description>&lt;P&gt;hi, how the contain function apply to my case where I want all Vendor Name contains "A" and "H"? This is for the circumstances where the vendor name not specific, (ABC Sdn Bhd, ABC Pte, ABC Subsidiary, GHI Sdn. Bhd., GHI Pte).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt;select where(contains(ages, age));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2017 21:05:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-10-04T21:05:54Z</dc:date>
    <item>
      <title>Select rows where column values match items in an arbitrary list</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/299#M299</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to write some JSL code to select rows from a table where the value of a column matches some values, which are stored as a list. However, the list may have an arbitrary number of items in it.&lt;BR /&gt;&lt;BR /&gt;I have tried the code at the bottom of the message (where b1 is the list containing my values to be selected, :Lot is the column to compare against and dt2 is the data table to be selected from) but that just selects the rows matching b1[last1]. I know I could produce a subset table for each value of b1[jj] and concatenate them afterwards, but that is messy and causes it's own problems later.&lt;BR /&gt;&lt;BR /&gt;I also tried an Eval(Substitute(Expr( type structure but that didn't work. &lt;BR /&gt;&lt;BR /&gt;Does anyone have any ideas? Or am I going about this completely the wrong way?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Matthew.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( jj = 1, jj &amp;lt;= last1, jj++,
dt2 &amp;lt;&amp;lt; Select Where( :Lot == b1[jj] )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Nov 2017 18:48:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/299#M299</guid>
      <dc:creator>matthewh</dc:creator>
      <dc:date>2017-11-02T18:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/300#M300</link>
      <description>Are you trying to select all the rows at once?  as in&lt;BR /&gt;&lt;BR /&gt;select all rows matching b1[1], b1[2]..., &lt;BR /&gt;perform operation &lt;BR /&gt;&lt;BR /&gt;Or are you trying to match the list sequentially and then perform some operation on the matching cells? &lt;BR /&gt;&lt;BR /&gt;select rows matching b1[1], &lt;BR /&gt;perform operation, &lt;BR /&gt;select rows matching b1[2], &lt;BR /&gt;perform operation,&lt;BR /&gt;...</description>
      <pubDate>Thu, 19 Mar 2009 17:48:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/300#M300</guid>
      <dc:creator>afterword</dc:creator>
      <dc:date>2009-03-19T17:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/301#M301</link>
      <description>I'm trying to select all rows that match the list then perform an operation on those rows.</description>
      <pubDate>Fri, 20 Mar 2009 09:06:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/301#M301</guid>
      <dc:creator>matthewh</dc:creator>
      <dc:date>2009-03-20T09:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/302#M302</link>
      <description>Hey did you ever figure out a solution to this? I am seeking a similar JSL for a data set and am unable to get the Select where function to select more than one condition. The current JSL I have is Data Table( Untitled ) &amp;lt;&amp;lt; select where (:Name 2 == ABC OR DEF).&lt;BR /&gt;&lt;BR /&gt;This doesnt work. It works for selecting the first condition, but no any subsequent ones. Any assistance or guidance will be appreciated. Thanks.&lt;BR /&gt;&lt;BR /&gt;Message was edited by: DLW&lt;BR /&gt;&lt;BR /&gt;Message was edited by: DLW</description>
      <pubDate>Tue, 16 Jun 2009 06:38:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/302#M302</guid>
      <dc:creator />
      <dc:date>2009-06-16T06:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/303#M303</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;unfortunately I didn't manage to solve this! I'm hopeful one of the JMP gurus on the forum can help here.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Matthew.</description>
      <pubDate>Tue, 16 Jun 2009 07:53:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/303#M303</guid>
      <dc:creator>matthewh</dc:creator>
      <dc:date>2009-06-16T07:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/304#M304</link>
      <description>&lt;P&gt;If you are not attached to "Select Where", one can try:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( jj = 1, jj &amp;lt;= N Items(b1), jj++,
For each row( If (:Lot == b1[jj],
Selected(RowState()) = 1)
));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 20:42:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/304#M304</guid>
      <dc:creator />
      <dc:date>2017-10-04T20:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/305#M305</link>
      <description>&lt;P&gt;Hi Matthew,&lt;BR /&gt;&lt;BR /&gt;Try the contains() function.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=open("$SAMPLE_DATA\Big Class.jmp");

ages={13, 14, 15};

dt&amp;lt;&amp;lt;select where(contains(ages, age));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 21:03:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/305#M305</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2017-10-04T21:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/306#M306</link>
      <description>Thanks, that works well!</description>
      <pubDate>Wed, 17 Jun 2009 16:45:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/306#M306</guid>
      <dc:creator>matthewh</dc:creator>
      <dc:date>2009-06-17T16:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/307#M307</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please advise my script:&lt;BR /&gt;&lt;BR /&gt;Column Name : Vendor, Contains : ABC, DEF, GHI&lt;BR /&gt;&lt;BR /&gt;1)  Data Table( test ) &amp;lt;&amp;lt; select where( :Vendor == ABC ) | (:Vendor == GHI)&lt;BR /&gt;&lt;BR /&gt;2)  Data Table( test ) &amp;lt;&amp;lt; select where( :Vendor == ABC ) &amp;amp; (:Vendor == GHI)&lt;BR /&gt;&lt;BR /&gt;Where I only get ABC not ABC &amp;amp; GHI.&lt;BR /&gt;&lt;BR /&gt;Anyone can help I would like to get more than one vendor?&lt;BR /&gt;&lt;BR /&gt;P.S:Please note Vendor, ABC, GHI in double quotation marks which can't show here.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Message was edited by: CLS</description>
      <pubDate>Fri, 19 Jun 2009 07:34:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/307#M307</guid>
      <dc:creator />
      <dc:date>2009-06-19T07:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/308#M308</link>
      <description>Hi, please advise my script:&lt;BR /&gt;&lt;BR /&gt;1)  Data Table( "test" ) &amp;lt;&amp;lt; select where( :"Vendor" == "ABC" ) | (:"Vendor" == "GHI")&lt;BR /&gt;2)  Data Table( "test" ) &amp;lt;&amp;lt; select where( :"Vendor" == "ABC" ) &amp;amp; (:"Vendor" == "GHI")&lt;BR /&gt;&lt;BR /&gt;Where I only get "ABC" not "ABC" &amp;amp; "GHI".  Anyone can help to get more than one vendor?&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 19 Jun 2009 07:43:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/308#M308</guid>
      <dc:creator />
      <dc:date>2009-06-19T07:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/309#M309</link>
      <description>&lt;P&gt;If I understand you correctly you wish to select both rows containing "ABC" as well as rows containing "GHI"?&lt;BR /&gt;&lt;BR /&gt;You can not use the "And" operator since a cell can not have two different values simultaneously.&lt;BR /&gt;&lt;BR /&gt;Use "Or" like in 1) but put paranthes around the whole logical statement, e.g.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( test ) &amp;lt;&amp;lt; select where( Or(:Vendor == "ABC" , :Vendor == "GHI"))
//which equals
Data Table( test ) &amp;lt;&amp;lt; select where( :Vendor == "ABC" | :Vendor == "GHI")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;!--&lt;br /&gt;Data Table( test ) &lt;&lt; select where( Or(:Vendor == "ABC" , :Vendor == "GHI"))&lt;br /&gt;which equals&lt;br /&gt;Data Table( test ) &lt;&lt; select where( :Vendor == "ABC" | :Vendor == "GHI")&lt;br /&gt;--&gt;</description>
      <pubDate>Wed, 04 Oct 2017 20:45:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/309#M309</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2017-10-04T20:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/310#M310</link>
      <description>MS, Thank you very much, it works!!!</description>
      <pubDate>Mon, 22 Jun 2009 08:42:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/310#M310</guid>
      <dc:creator />
      <dc:date>2009-06-22T08:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/311#M311</link>
      <description>&lt;P&gt;hi, how the contain function apply to my case where I want all Vendor Name contains "A" and "H"? This is for the circumstances where the vendor name not specific, (ABC Sdn Bhd, ABC Pte, ABC Subsidiary, GHI Sdn. Bhd., GHI Pte).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt;select where(contains(ages, age));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 21:05:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/311#M311</guid>
      <dc:creator />
      <dc:date>2017-10-04T21:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/312#M312</link>
      <description>hi, Jeff&lt;BR /&gt;&lt;BR /&gt;i hv tried, the script seems working to ur datatable but not mine.&lt;BR /&gt;&lt;BR /&gt;could u pls help if column name : vendor, contain AABC, DAAF, GIAA&lt;BR /&gt;how to write the script to select where vendor name contain AA?&lt;BR /&gt;&lt;BR /&gt;THanks!</description>
      <pubDate>Tue, 23 Jun 2009 08:30:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/312#M312</guid>
      <dc:creator />
      <dc:date>2009-06-23T08:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/313#M313</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt;select where(contains(:vendor,"AA"));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;!--&lt;br /&gt;&lt;br /&gt;dt&lt;&lt;select where(contains(:vendor,"AA"));&lt;br &gt;&lt;/select&gt;&lt;br /&gt;--&gt;</description>
      <pubDate>Wed, 04 Oct 2017 20:44:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/313#M313</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2017-10-04T20:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/769072#M94951</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6878"&gt;@Jeff_Perkinson&lt;/a&gt;&amp;nbsp;, is there a similar trick which can be used together with the new Where?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=open("$SAMPLE_DATA\Big Class.jmp");

ages={13, 14, 15};

dt&amp;lt;&amp;lt;select where(contains(ages, :age));

//how to make this work?
where(dt, contains(ages, :age));
where(dt, contains(ages, :age[]));
where(dt, contains(ages, As Column(:age)))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1719516288577.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65670i9F571932B5895B4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1719516288577.png" alt="hogi_0-1719516288577.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 19:25:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/769072#M94951</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-06-27T19:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/893488#M105437</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6878"&gt;@Jeff_Perkinson&lt;/a&gt;&amp;nbsp;, is there a similar trick which can be used together with the new Where?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;unfortunately, there is no solution:TS-00225505&lt;BR /&gt;&lt;EM&gt;Lists, Matrices, and Columns are all assumed to vary together within Where. There is currently no way to escape/prevent this&lt;/EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 17:25:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/893488#M105437</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-08-08T17:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where</title>
      <link>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/893489#M105438</link>
      <description>&lt;P&gt;-&amp;gt; added to&amp;nbsp;&lt;LI-MESSAGE title="Tiny Traps in Jmp and JSL" uid="702685" url="https://community.jmp.com/t5/Discussions/Tiny-Traps-in-Jmp-and-JSL/m-p/702685#U702685" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 17:28:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-rows-where-column-values-match-items-in-an-arbitrary-list/m-p/893489#M105438</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-08-08T17:28:32Z</dc:date>
    </item>
  </channel>
</rss>

