<?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: add rows after selected rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49735#M28301</link>
    <description>Thanks for th efast Reply, however, I tried out all variations with your answer and it still gives me this error:&lt;BR /&gt;&lt;BR /&gt;Unexpected "$".&lt;BR /&gt;Trying to parse operand for ":" operator.&lt;BR /&gt;Line 1 Column 13: dt = Open (:►$SMHI_Trend_IKEU_Profiler_merge_only 2&lt;BR /&gt;&lt;BR /&gt;I wrote several variations like this one:&lt;BR /&gt;&lt;BR /&gt;dt = Open (:$SMHI_Trend_IKEU_Profiler_merge_only 20 year.jmp");&lt;BR /&gt;&lt;BR /&gt;Any ideas, what I am doing wrong? (I am a very beginner in this, sorry)&lt;BR /&gt;</description>
    <pubDate>Tue, 16 Jan 2018 22:52:05 GMT</pubDate>
    <dc:creator>Pacco</dc:creator>
    <dc:date>2018-01-16T22:52:05Z</dc:date>
    <item>
      <title>add rows after selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/48716#M27700</link>
      <description>&lt;P&gt;Hello community,I am new to jmp and have troubles with creating a script that would add 1 row after each selected row within my dataset. Any ideas? My code looks like this so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt=Current data Table ();&lt;BR /&gt;dt&amp;lt;&amp;lt;add rows(1,46030);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this of course adds a row only after the specified column. I selected my rows according to a sepcific name in one column and a sepcific value wihtin another column. How can I automatically enter a row after all my selected rows that are not adjacent but have unselected rows in between them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 18:37:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/48716#M27700</guid>
      <dc:creator>Pacco</dc:creator>
      <dc:date>2017-12-15T18:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: add rows after selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/48729#M27702</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10528"&gt;@Pacco&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Welcome to the JMP Community.&amp;nbsp; Let me try and explain this and solve the problem. The Add Rows messge only specifies the # of rows and where to add so JMP is executing what the function is telling it to do. In order to scale it for your needs , we can try the following :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Cities.jmp" );

dt &amp;lt;&amp;lt; Select Randomly(0.1); // Selecting rows randomly 

SR = dt &amp;lt;&amp;lt; Get Selected Rows;  // Get list of selected rows 

for(i = 1 , i &amp;lt;= N Rows(SR), i++,
		dt &amp;lt;&amp;lt; Add Rows(1,SR[i]); // Add 1 row after each selected row
   );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this helps and addresses your question&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 19:02:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/48729#M27702</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2017-12-15T19:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: add rows after selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/48743#M27708</link>
      <description>&lt;P&gt;Because the inserted rows will change the selected row numbers, the below modification to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6696"&gt;@uday_guntupalli&lt;/a&gt;&amp;nbsp;script has to be made to actually get the results you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );

dt &amp;lt;&amp;lt; Select Randomly( 0.1 ); // Selecting rows randomly 

SR = dt &amp;lt;&amp;lt; Get Selected Rows;  // Get list of selected rows 

For( i = 1, i &amp;lt;= N Rows( SR ), i++,
	dt &amp;lt;&amp;lt; Add Rows( 1, SR[i] ); // Add 1 row after each selected row
	SR = dt &amp;lt;&amp;lt; Get Selected Rows;
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Dec 2017 21:48:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/48743#M27708</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-12-15T21:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: add rows after selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49731#M28298</link>
      <description>&lt;P&gt;Thanks a lot, this script work perfectly for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing I don´t understand, yet, is why my&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt&amp;lt;&amp;lt; open("$...");&lt;/P&gt;&lt;P&gt;function doesn´t work. I always have to use dt&amp;lt;&amp;lt; CurrentDataTable (); while having my table open already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for the valuable information!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 22:24:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49731#M28298</guid>
      <dc:creator>Pacco</dc:creator>
      <dc:date>2018-01-16T22:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: add rows after selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49733#M28300</link>
      <description>&lt;P&gt;&lt;SPAN&gt;dt&amp;lt;&amp;lt; open("$...");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;is incorrect.&amp;nbsp; The specified usage is&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;dt = Open(:$...");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It opens up the sample data table and assigns a handle to the openned data table called "dt";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;dt = Current Data Table();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;does the same thing as the Open() function, except it asigns to "dt" a pointer/handle to the current active data table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;See&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help&amp;gt;Scripting Index&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;for further details.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 22:36:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49733#M28300</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-01-16T22:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: add rows after selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49735#M28301</link>
      <description>Thanks for th efast Reply, however, I tried out all variations with your answer and it still gives me this error:&lt;BR /&gt;&lt;BR /&gt;Unexpected "$".&lt;BR /&gt;Trying to parse operand for ":" operator.&lt;BR /&gt;Line 1 Column 13: dt = Open (:►$SMHI_Trend_IKEU_Profiler_merge_only 2&lt;BR /&gt;&lt;BR /&gt;I wrote several variations like this one:&lt;BR /&gt;&lt;BR /&gt;dt = Open (:$SMHI_Trend_IKEU_Profiler_merge_only 20 year.jmp");&lt;BR /&gt;&lt;BR /&gt;Any ideas, what I am doing wrong? (I am a very beginner in this, sorry)&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Jan 2018 22:52:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49735#M28301</guid>
      <dc:creator>Pacco</dc:creator>
      <dc:date>2018-01-16T22:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: add rows after selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49738#M28303</link>
      <description>&lt;P&gt;$SAMPLE_DATA&lt;/P&gt;
&lt;P&gt;is an special environment variable for JMP.&amp;nbsp; The structure of the OPEN() function is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Open( file path, &amp;lt;invisible&amp;gt;, &amp;lt;private&amp;gt;, &amp;lt;select columns(list)&amp;gt; | &amp;lt;ignore columns(list)&amp;gt; )&lt;/P&gt;
&lt;P&gt;See below, the Scripting Index for the Open&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="open.PNG" style="width: 897px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8947i7DBF0EFE4BF49741/image-size/large?v=v2&amp;amp;px=999" role="button" title="open.PNG" alt="open.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 23:00:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/add-rows-after-selected-rows/m-p/49738#M28303</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-01-16T23:00:37Z</dc:date>
    </item>
  </channel>
</rss>

