<?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: new column with all value set to zero in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59862#M32738</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt;new column("All Zeros", set each value(0));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See the Scripting Index for details about this&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index==&amp;gt;Data Table==&amp;gt;Column Scripting&lt;/P&gt;</description>
    <pubDate>Sun, 10 Jun 2018 13:13:56 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-06-10T13:13:56Z</dc:date>
    <item>
      <title>new column with all value set to zero</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59855#M32733</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;how can I create a new numeric&amp;nbsp;column with all values are zero and not empty?&lt;BR /&gt;&lt;BR /&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 11:19:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59855#M32733</guid>
      <dc:creator>AdamChoen</dc:creator>
      <dc:date>2018-06-10T11:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: new column with all value set to zero</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59858#M32735</link>
      <description>&lt;P&gt;Create your new column, then go to the Column Info for the column, click on the down arrow for "Initialize Data" and select "Constant".&amp;nbsp; Then enter in your "0" and clock OK&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zero.PNG" style="width: 422px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11049i61C6749D7D6E8CFA/image-dimensions/422x288?v=v2" width="422" height="288" role="button" title="zero.PNG" alt="zero.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 12:12:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59858#M32735</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-10T12:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: new column with all value set to zero</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59859#M32736</link>
      <description>&lt;P&gt;thank Jim,&lt;BR /&gt;I&amp;nbsp;forgot to ask for it, can I write it in JSL?&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 13:09:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59859#M32736</guid>
      <dc:creator>AdamChoen</dc:creator>
      <dc:date>2018-06-10T13:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: new column with all value set to zero</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59862#M32738</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt;new column("All Zeros", set each value(0));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See the Scripting Index for details about this&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index==&amp;gt;Data Table==&amp;gt;Column Scripting&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 13:13:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59862#M32738</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-10T13:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: new column with all value set to zero</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59863#M32739</link>
      <description>As always, work great. Thank you Jim</description>
      <pubDate>Sun, 10 Jun 2018 13:22:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/59863#M32739</guid>
      <dc:creator>AdamChoen</dc:creator>
      <dc:date>2018-06-10T13:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: new column with all value set to zero</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/193323#M41367</link>
      <description>&lt;P&gt;For future searchers of a solution like this.&lt;/P&gt;&lt;P&gt;I wanted to do the same but with a character value like a file name for the source file upon import.&amp;nbsp; It seems like you have to declare Character in the New Column function to get it to work right.&amp;nbsp; Otherwise, it just populates with missing values.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;This didn't work:&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column(colName, Set each value(fileName));&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;This did:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = current data table();

colName = "SourceFile";
fileName = dt &amp;lt;&amp;lt; get name;

dt &amp;lt;&amp;lt; New Column(colName, Character, Nominal, Set each value(fileName));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This thread had it:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Discussions/Set-Column-Values/td-p/13584" target="_blank"&gt;&amp;nbsp;https://community.jmp.com/t5/Discussions/Set-Column-Values/td-p/13584&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 16:23:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-with-all-value-set-to-zero/m-p/193323#M41367</guid>
      <dc:creator>BSwid</dc:creator>
      <dc:date>2019-04-17T16:23:20Z</dc:date>
    </item>
  </channel>
</rss>

