<?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: Get the value from a given column on the first selected row using JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666785#M85480</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;:&amp;nbsp; This approach takes the better part of a full second to return the value in a large table (33M rows).&amp;nbsp; The table otherwise behaves ok, so I'm thinking this approach may be doing something heavy-handed under the cover...&amp;nbsp; Are there other approaches I could test?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;gt; UPDATE:&amp;nbsp; I just realized that it's the "Get Selected Rows()" call that's slow, not the data access.&amp;nbsp; Curious, seems like that should be fast.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 18:43:35 GMT</pubDate>
    <dc:creator>BHarris</dc:creator>
    <dc:date>2023-08-08T18:43:35Z</dc:date>
    <item>
      <title>Get the value from a given column on the first selected row using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666485#M85458</link>
      <description>&lt;P&gt;I'm trying to simply get the value from a given column on the first selected row -- but somehow this is surprisingly hard.&amp;nbsp; Here's what I have so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Probe.jmp" );
dt &amp;lt;&amp;lt; Select Where( :Wafer Number == "16" &amp;amp; :Die X == 3);
selRow = ( dt &amp;lt;&amp;lt; get selected rows() )[0];
Row() = selRow;
site = :Site;   // returns "1", should return "5" (:Site from row 15)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I expect "site" to end up with 5, but it ends up with 1.&amp;nbsp; What am I missing here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also note, I was trying something similar to this on a table with 33M rows, and JMP was unresponsive for several minutes.&amp;nbsp; I was experimenting with different ways to do this so I may have inadvertently asked it to first create a list of 33M things then to take the 14M-th item.&amp;nbsp; I hope whatever solution I end up with to the above question won't do that.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 05:18:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666485#M85458</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2023-08-08T05:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value from a given column on the first selected row using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666508#M85459</link>
      <description>&lt;P&gt;You need to reference only the first [1] element in the Get Rows Where matrix&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Probe.jmp" );
dt &amp;lt;&amp;lt; Select Where( :Wafer Number == "16" &amp;amp; :Die X == 3 );
site = :site[(dt &amp;lt;&amp;lt; get selected rows())[1]];

// or

dt = Open( "$SAMPLE_DATA/Probe.jmp" );
site = :Site[(dt &amp;lt;&amp;lt; get rows where( :Wafer Number == "16" &amp;amp; :Die X == 3 ))[1]];&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Aug 2023 05:43:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666508#M85459</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-08-08T05:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value from a given column on the first selected row using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666668#M85472</link>
      <description>&lt;P&gt;So data in data tables is fundamentally stored as a set of columns which are each a list of entries?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(And yes, I'm a python coder so I missed the [0] -&amp;gt; [1] thing...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I scoured all of the JMP documentation sections that I thought might help and couldn't find anything on this, i.e. the :site[rowNumber] notation.&amp;nbsp; If someone knows where this is, I'd love to read that section of the documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Jim!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 15:32:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666668#M85472</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2023-08-08T15:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value from a given column on the first selected row using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666690#M85473</link>
      <description>&lt;P&gt;&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; is good post in community and you can find documentation from Scripting Guide &lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/access-data-values.shtml#" target="_self"&gt; Scripting Guide &amp;gt; Data Tables &amp;gt; Access Data Values&lt;/A&gt; is a good starting point. It provides additional links to other pages with more information&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 15:49:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666690#M85473</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-08-08T15:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value from a given column on the first selected row using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666785#M85480</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;:&amp;nbsp; This approach takes the better part of a full second to return the value in a large table (33M rows).&amp;nbsp; The table otherwise behaves ok, so I'm thinking this approach may be doing something heavy-handed under the cover...&amp;nbsp; Are there other approaches I could test?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;gt; UPDATE:&amp;nbsp; I just realized that it's the "Get Selected Rows()" call that's slow, not the data access.&amp;nbsp; Curious, seems like that should be fast.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 18:43:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666785#M85480</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2023-08-08T18:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value from a given column on the first selected row using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666807#M85483</link>
      <description>&lt;P&gt;I typically use the Get Rows Where() over the Select Where, followed by the Get Selected Rows.&amp;nbsp; Unless you need the visual display of selected rows, I have always though it was faster.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 19:00:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666807#M85483</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-08-08T19:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value from a given column on the first selected row using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666932#M85493</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;My true purpose was not the "select where", but instead that I'm clicking a point in one graph builder plot tied to data table (A), and I want to update the Data Filter in a Graph Builder plot tied to data table (B).&amp;nbsp; The first click selects the rows, then the JSL should grab the id field from the selected row of the first table, and then stick that value in the data filter on the Graph Builder B plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got it working today (yeah!) using Get Selected Rows(), but it's just curious that-that function is relatively slow on large datasets.&amp;nbsp; Makes me think it's searching an invisible column for all of the "1"s or something...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 03:38:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-the-value-from-a-given-column-on-the-first-selected-row/m-p/666932#M85493</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2023-08-09T03:38:58Z</dc:date>
    </item>
  </channel>
</rss>

