<?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: JSL fill to end of table using first row value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188377#M40720</link>
    <description>&lt;P&gt;Ian is correct in his answer to your question.&amp;nbsp; I have at times wanted to do the OTHER thing in the menu image you showed (Fill to row ...), which is also pretty simple by just using the Row Index functions to select the cells you want to fill.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="code"&gt;dt &amp;lt;&amp;lt; Select Where( Any( Row() == Index( 7, 10 ) ) );&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2019 13:39:15 GMT</pubDate>
    <dc:creator>andersonmj2</dc:creator>
    <dc:date>2019-03-21T13:39:15Z</dc:date>
    <item>
      <title>JSL fill to end of table using first row value</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188325#M40710</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using JSL script, I want the first cell value in "Intercept" column to Fill to end of table with the same value in first cell. Can anyone show me how to write it in script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 576px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16561i7168C70A117CB87B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 10:27:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188325#M40710</guid>
      <dc:creator>ReginaHong</dc:creator>
      <dc:date>2019-03-21T10:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: JSL fill to end of table using first row value</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188358#M40711</link>
      <description>&lt;P&gt;Using 'Help &amp;gt; Scripting Index' is good for this kind of thing. In this case, the example is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; New Column( "X" );
dt:X &amp;lt;&amp;lt; Set Each Value( 5 );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Mar 2019 11:51:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188358#M40711</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2019-03-21T11:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: JSL fill to end of table using first row value</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188377#M40720</link>
      <description>&lt;P&gt;Ian is correct in his answer to your question.&amp;nbsp; I have at times wanted to do the OTHER thing in the menu image you showed (Fill to row ...), which is also pretty simple by just using the Row Index functions to select the cells you want to fill.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="code"&gt;dt &amp;lt;&amp;lt; Select Where( Any( Row() == Index( 7, 10 ) ) );&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 13:39:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188377#M40720</guid>
      <dc:creator>andersonmj2</dc:creator>
      <dc:date>2019-03-21T13:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: JSL fill to end of table using first row value</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188782#M40743</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What if my value in first row can change from time to time instead of having a fix value? Can I script it in a way that it will always use the first row value (not a fix value) to fill up the rest of the rows in that column?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 01:41:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188782#M40743</guid>
      <dc:creator>ReginaHong</dc:creator>
      <dc:date>2019-03-22T01:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: JSL fill to end of table using first row value</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188802#M40748</link>
      <description>&lt;P&gt;I think the answer depends on what else is happening within your JSL, and how you want a user (assuming there is one) to interact with this. You can do something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; New Column( "X" );
dt:X[1] = 5;
dt &amp;lt;&amp;lt; New Column( "X2", Formula(if(Row() == 1, :X, Lag(:X2, 1))));
dt &amp;lt;&amp;lt; runFormulas;
Wait(2);
dt:X[1] = 10;
dt &amp;lt;&amp;lt; runFormulas;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but that doesn't seem very useful. Because a formula column is computed, JMP will not allow you to edit one of the cells therein.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 10:38:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-fill-to-end-of-table-using-first-row-value/m-p/188802#M40748</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2019-03-22T10:38:36Z</dc:date>
    </item>
  </channel>
</rss>

