<?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 question in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390062#M64020</link>
    <description>&lt;P&gt;I think this was a simple case of "close it and open it again". My data table must have gotten corrupted somehow because when I closed and reopened it, my code worked fine. Sorry for any inconvenience.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jun 2021 22:38:04 GMT</pubDate>
    <dc:creator>dlemieu1</dc:creator>
    <dc:date>2021-06-02T22:38:04Z</dc:date>
    <item>
      <title>Add Rows question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390034#M64016</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New JSL scripter here. Trying to get 5 new rows added after every existing row, 25 rows in the data table. No issues while debugging, i changes from 25 to 1 in increments of 1 as expected, but no new rows are added to my data table at any point during/after the For loop. Not sure what I'm doing wrong, any help would be appreciated!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();

For(i=N Rows(dt),i&amp;gt;=1, i--,
	dt &amp;lt;&amp;lt; Add Rows( 5, i ); 
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:48:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390034#M64016</guid>
      <dc:creator>dlemieu1</dc:creator>
      <dc:date>2023-06-09T19:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390055#M64017</link>
      <description>&lt;P&gt;I've never used the 2-argument form, but the scripting index shows this example, using a keyword to specify the meaning of the 2nd arg&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Add Rows( 3, after( 5 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Jun 2021 22:09:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390055#M64017</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-06-02T22:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390058#M64018</link>
      <description>&lt;P&gt;I am a bit confused.&amp;nbsp; Given the below table&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="expand1.PNG" style="width: 380px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33204i00EF3E2165FE714B/image-size/large?v=v2&amp;amp;px=999" role="button" title="expand1.PNG" alt="expand1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Your script creates&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="expand2.PNG" style="width: 373px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33205i324FEC714A66915C/image-size/large?v=v2&amp;amp;px=999" role="button" title="expand2.PNG" alt="expand2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Which is what my understanding is what you want.&lt;/P&gt;
&lt;P&gt;Here is my script, using your code that creates the above data table and it's expansion&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
// Create a table with 25 rows
dt = New Table( "Example",
	Add Rows( 25 ),
	New Script( "Source", Data Table( "Untitled 97" ) &amp;lt;&amp;lt; Subset( All rows, Selected columns only( 0 ) ) ),
	New Column( "Column 1",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]
		)
	)
);

Wait( 5 );
// Now create the new rows

For( i = N Rows( dt ), i &amp;gt;= 1, i--,
	dt &amp;lt;&amp;lt; Add Rows( 5, i )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Jun 2021 22:14:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390058#M64018</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-06-02T22:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390062#M64020</link>
      <description>&lt;P&gt;I think this was a simple case of "close it and open it again". My data table must have gotten corrupted somehow because when I closed and reopened it, my code worked fine. Sorry for any inconvenience.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 22:38:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-question/m-p/390062#M64020</guid>
      <dc:creator>dlemieu1</dc:creator>
      <dc:date>2021-06-02T22:38:04Z</dc:date>
    </item>
  </channel>
</rss>

