<?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 Put in a list values of a table with condition in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Put-in-a-list-values-of-a-table-with-condition/m-p/486697#M73055</link>
    <description>&lt;P&gt;I have this table :&lt;/P&gt;&lt;P&gt;dut&amp;nbsp; |&amp;nbsp; values&lt;/P&gt;&lt;P&gt;0&amp;nbsp; | 1638&lt;/P&gt;&lt;P&gt;1&amp;nbsp; | 618&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; | 486&lt;/P&gt;&lt;P&gt;3&amp;nbsp; | 9418&lt;/P&gt;&lt;P&gt;0&amp;nbsp; | 654&lt;/P&gt;&lt;P&gt;1&amp;nbsp; | 791&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; | 1398&lt;/P&gt;&lt;P&gt;3&amp;nbsp; | 4836&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I want put in a list, all values where the dut is 0, so have this : list = { 1638, 654 }&lt;/P&gt;&lt;P&gt;What syntax used ?&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:48:18 GMT</pubDate>
    <dc:creator>OrderedColt522</dc:creator>
    <dc:date>2023-06-10T23:48:18Z</dc:date>
    <item>
      <title>Put in a list values of a table with condition</title>
      <link>https://community.jmp.com/t5/Discussions/Put-in-a-list-values-of-a-table-with-condition/m-p/486697#M73055</link>
      <description>&lt;P&gt;I have this table :&lt;/P&gt;&lt;P&gt;dut&amp;nbsp; |&amp;nbsp; values&lt;/P&gt;&lt;P&gt;0&amp;nbsp; | 1638&lt;/P&gt;&lt;P&gt;1&amp;nbsp; | 618&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; | 486&lt;/P&gt;&lt;P&gt;3&amp;nbsp; | 9418&lt;/P&gt;&lt;P&gt;0&amp;nbsp; | 654&lt;/P&gt;&lt;P&gt;1&amp;nbsp; | 791&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; | 1398&lt;/P&gt;&lt;P&gt;3&amp;nbsp; | 4836&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I want put in a list, all values where the dut is 0, so have this : list = { 1638, 654 }&lt;/P&gt;&lt;P&gt;What syntax used ?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:48:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Put-in-a-list-values-of-a-table-with-condition/m-p/486697#M73055</guid>
      <dc:creator>OrderedColt522</dc:creator>
      <dc:date>2023-06-10T23:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Put in a list values of a table with condition</title>
      <link>https://community.jmp.com/t5/Discussions/Put-in-a-list-values-of-a-table-with-condition/m-p/486716#M73056</link>
      <description>&lt;P&gt;My preferred method is using &lt;LI-MESSAGE title="Data table subscripting" uid="21013" url="https://community.jmp.com/t5/Uncharted/Data-table-subscripting/m-p/21013#U21013" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; with Loc, but there are many other ways to accomplish this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(8),
	New Column("dut", Numeric, "Continuous", Format("Best", 12), Set Values([0, 1, 2, 3, 0, 1, 2, 3])),
	New Column("value", Numeric, "Continuous", Format("Best", 12), Set Values([1638, 618, 486, 9418, 654, 791, 1398, 4836]))
);

zero_rows = Loc(dt[0, "dut"], 0);
list_of_values = dt[zero_rows, "value"]; // and you can convert this to list with As List();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 May 2022 13:23:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Put-in-a-list-values-of-a-table-with-condition/m-p/486716#M73056</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-05-13T13:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Put in a list values of a table with condition</title>
      <link>https://community.jmp.com/t5/Discussions/Put-in-a-list-values-of-a-table-with-condition/m-p/486768#M73060</link>
      <description>&lt;P&gt;Here is another approach to the same solution&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(8),
	New Column("dut", Numeric, "Continuous", Format("Best", 12), Set Values([0, 1, 2, 3, 0, 1, 2, 3])),
	New Column("value", Numeric, "Continuous", Format("Best", 12), Set Values([1638, 618, 486, 9418, 654, 791, 1398, 4836]))
);

theList = As List( :value[dt &amp;lt;&amp;lt; get rows where( :dut == 0 )] );

Show( theList );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;theList = as list(:value[dt&amp;lt;&amp;lt;get rows where(:dut == 0)])
/*:

{1638, 654}&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 May 2022 15:12:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Put-in-a-list-values-of-a-table-with-condition/m-p/486768#M73060</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-05-13T15:12:04Z</dc:date>
    </item>
  </channel>
</rss>

