<?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 access and repeat row values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/access-and-repeat-row-values/m-p/232060#M46033</link>
    <description>&lt;P&gt;I am trying to write a code where I can get value from a row and then repeat it in 13 successive rows of the same column.&lt;/P&gt;&lt;P&gt;I want to read value from row number 15 and repeat in rows 16 to 28.&lt;/P&gt;&lt;P&gt;Then read value from row number 29 and repeat until row 43 so on and so forth.&lt;/P&gt;&lt;P&gt;How can I do this in jsl?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 04 Nov 2019 22:03:25 GMT</pubDate>
    <dc:creator>ENTHU</dc:creator>
    <dc:date>2019-11-04T22:03:25Z</dc:date>
    <item>
      <title>access and repeat row values</title>
      <link>https://community.jmp.com/t5/Discussions/access-and-repeat-row-values/m-p/232060#M46033</link>
      <description>&lt;P&gt;I am trying to write a code where I can get value from a row and then repeat it in 13 successive rows of the same column.&lt;/P&gt;&lt;P&gt;I want to read value from row number 15 and repeat in rows 16 to 28.&lt;/P&gt;&lt;P&gt;Then read value from row number 29 and repeat until row 43 so on and so forth.&lt;/P&gt;&lt;P&gt;How can I do this in jsl?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 22:03:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/access-and-repeat-row-values/m-p/232060#M46033</guid>
      <dc:creator>ENTHU</dc:creator>
      <dc:date>2019-11-04T22:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: access and repeat row values</title>
      <link>https://community.jmp.com/t5/Discussions/access-and-repeat-row-values/m-p/232072#M46035</link>
      <description>&lt;P&gt;This is a very simple thing for one to do in JSL.&amp;nbsp; Below is my version of the code.&amp;nbsp; I don't know what the name of the column is that you want to change the values for, so I am just calling it "theColumn".&amp;nbsp; I really haven't tested the code, but I am pretty sure it will work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

For( i = 1, i &amp;lt;= N Rows( dt ), i = i + 14,
	For( k = i + 1, k &amp;lt;= i + 13, k++,
		dt:theColumn[k] = dt:theColumn[i]
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Nov 2019 23:27:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/access-and-repeat-row-values/m-p/232072#M46035</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-11-04T23:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: access and repeat row values</title>
      <link>https://community.jmp.com/t5/Discussions/access-and-repeat-row-values/m-p/232328#M46092</link>
      <description>&lt;P&gt;If you want to keep the original column, you could add a new column with a formula. For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Column("Repeat14",
    Formula(
        If(Row() &amp;gt; 14,
            :OriginalCol[Row() - Mod(Row() - 1, 14)],
            :OriginalCol
        )
    )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Nov 2019 23:54:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/access-and-repeat-row-values/m-p/232328#M46092</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2019-11-05T23:54:12Z</dc:date>
    </item>
  </channel>
</rss>

