<?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: How do I copy a row of selected data from one table to another using jsl? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41879#M24425</link>
    <description>&lt;P&gt;Hi Craige,&lt;/P&gt;&lt;P&gt;Thank you for the quick reply.&lt;/P&gt;&lt;P&gt;The columns are identically ordered.&amp;nbsp; Using JMP 11 so the data table subscripting does not seem to work. See screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The concatenation script opens a subset table which I do not require.&amp;nbsp; I have 2 tables open, one table generates a chart.&amp;nbsp; From this chart I select specific points that are to be copied to another table.&amp;nbsp; I will be selecting a single data point and then run the script to copy the data over the the table.&amp;nbsp; Then select another point and run the script.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2017 18:33:02 GMT</pubDate>
    <dc:creator>Onjai</dc:creator>
    <dc:date>2017-07-12T18:33:02Z</dc:date>
    <item>
      <title>How do I copy a row of selected data from one table to another using jsl?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41859#M24418</link>
      <description>&lt;P&gt;Trying to use jsl script to copy a row of data that was selected from a fit y by x and paste that to another table (BigClass2).&amp;nbsp; Using the Big Class table,&amp;nbsp; Oneway Analysis of height By name, I select one point on the chart which selects the row in the table.&amp;nbsp; I can get the row number but cannot find how to copy the selected cell values.&amp;nbsp; Searched forum and did not locate a solution.&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt = Data Table( "Big Class" );&lt;BR /&gt;dt2 = Data Table( "BigClass2" );&lt;BR /&gt;sel = dt &amp;lt;&amp;lt; Get Selected Rows;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 16:14:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41859#M24418</guid>
      <dc:creator>Onjai</dc:creator>
      <dc:date>2017-07-12T16:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I copy a row of selected data from one table to another using jsl?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41875#M24422</link>
      <description>&lt;P&gt;Here's one approach using &lt;A href="https://community.jmp.com/t5/Uncharted/Data-table-subscripting/ba-p/21013" target="_blank"&gt;data table subscripting&lt;/A&gt;&amp;nbsp;(needs JMP 13); it depends on the table columns being identically ordered.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dt = Open( "$sample_data/Big Class.jmp" );&lt;BR /&gt;dt2 = subset( dt );&lt;BR /&gt;dt &amp;lt;&amp;lt; select rows( {2, 4, 6} );&lt;BR /&gt;sel = dt &amp;lt;&amp;lt; Get Selected Rows; // [2,4,6]&lt;BR /&gt;seldata = dt[sel, 0]; // {{"LOUISE", 12, "F", 61, 123}, {"J...&lt;BR /&gt;oldend = N Rows( dt2 ); // 40&lt;BR /&gt;dt2 &amp;lt;&amp;lt; addrows( N Items( seldata ) ); // add 3 rows to end&lt;BR /&gt;// copy the seldata to the end, one after the old end&lt;BR /&gt;dt2[oldend + 1 :: oldend + N Items( seldata ), 0] = seldata;&lt;/PRE&gt;
&lt;P&gt;Here's an approach using concatenation:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$sample_data/Big Class.jmp" );
dt2 = subset( dt );
dt &amp;lt;&amp;lt; select rows( {2, 4, 6} );
dt3 = dt &amp;lt;&amp;lt; subset( Selected Rows( 1 ), Selected columns only( 0 ) );
dt2 &amp;lt;&amp;lt; concatenate( dt3, AppendToFirstTable( 1 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2017 17:22:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41875#M24422</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2017-07-12T17:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I copy a row of selected data from one table to another using jsl?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41879#M24425</link>
      <description>&lt;P&gt;Hi Craige,&lt;/P&gt;&lt;P&gt;Thank you for the quick reply.&lt;/P&gt;&lt;P&gt;The columns are identically ordered.&amp;nbsp; Using JMP 11 so the data table subscripting does not seem to work. See screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The concatenation script opens a subset table which I do not require.&amp;nbsp; I have 2 tables open, one table generates a chart.&amp;nbsp; From this chart I select specific points that are to be copied to another table.&amp;nbsp; I will be selecting a single data point and then run the script to copy the data over the the table.&amp;nbsp; Then select another point and run the script.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 18:33:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41879#M24425</guid>
      <dc:creator>Onjai</dc:creator>
      <dc:date>2017-07-12T18:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I copy a row of selected data from one table to another using jsl?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41881#M24426</link>
      <description>&lt;P&gt;This time with the screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6756i1526C5679D09E956/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot.jpg" alt="screenshot.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 18:42:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41881#M24426</guid>
      <dc:creator>Onjai</dc:creator>
      <dc:date>2017-07-12T18:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I copy a row of selected data from one table to another using jsl?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41882#M24427</link>
      <description>&lt;P&gt;Make the subset invisible, then delete it when no longer needed.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$sample_data/Big Class.jmp" );
dt2 = subset( dt );
dt &amp;lt;&amp;lt; select rows( {2, 4, 6} );
dt3 = dt &amp;lt;&amp;lt; subset( Selected Rows( 1 ), Selected columns only( 0 ),invisible );
dt2 &amp;lt;&amp;lt; concatenate( dt3, AppendToFirstTable( 1 ) );
close(dt3,"nosave");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2017 19:02:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41882#M24427</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2017-07-12T19:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I copy a row of selected data from one table to another using jsl?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41918#M24455</link>
      <description>&lt;P&gt;This worked.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 14:13:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-copy-a-row-of-selected-data-from-one-table-to-another/m-p/41918#M24455</guid>
      <dc:creator>Onjai</dc:creator>
      <dc:date>2017-07-13T14:13:30Z</dc:date>
    </item>
  </channel>
</rss>

