<?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: Keep Leading Zeros in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/249541#M49006</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp; has shown the best solution.&amp;nbsp; However, if you already have one or more data tables in JMP that have the incorrect values for the ID column, below is a very simple script that will convert the values&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

// Change the ID column to character
dt:ID &amp;lt;&amp;lt; set data type( character );

// Loop through each row adding in the missing leading zeros
For Each Row( 
	:ID = Substr( "00000000", 1, 8 - Length( :ID ) ) || :ID;
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Just swap out the reference to :ID to the actual name of your column&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 19:33:54 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-02-27T19:33:54Z</dc:date>
    <item>
      <title>Keep Leading Zeros</title>
      <link>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/249512#M49000</link>
      <description>&lt;P&gt;One of the columns in my data set is Employee ID. All employee ID's have a length of 8 and begin with leading zeros. When I open the excel file that has the data JMP seems to drop those leading zeros. Is there a way to get JMP to not do that? Or does it have to do with the way that column is stored in the xlsx file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the code I found on here to just add them back in but it added them for the first row and then just changed every character to 0's for every other row. Any help is greatly appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 18:49:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/249512#M49000</guid>
      <dc:creator>ACraig</dc:creator>
      <dc:date>2020-02-27T18:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Keep Leading Zeros</title>
      <link>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/249516#M49002</link>
      <description>&lt;P&gt;It sounds like the numeric code is just a label or category (ID), so you could keep it as character data. Use the option in the preview pane of the Excel Import Wizard to change the default interpretation (Numeric) to Character.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 18:54:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/249516#M49002</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-02-27T18:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Keep Leading Zeros</title>
      <link>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/249541#M49006</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp; has shown the best solution.&amp;nbsp; However, if you already have one or more data tables in JMP that have the incorrect values for the ID column, below is a very simple script that will convert the values&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

// Change the ID column to character
dt:ID &amp;lt;&amp;lt; set data type( character );

// Loop through each row adding in the missing leading zeros
For Each Row( 
	:ID = Substr( "00000000", 1, 8 - Length( :ID ) ) || :ID;
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Just swap out the reference to :ID to the actual name of your column&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 19:33:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/249541#M49006</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-02-27T19:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Keep Leading Zeros</title>
      <link>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/916311#M107666</link>
      <description>&lt;P&gt;Another Approach: use &lt;FONT face="courier new,courier"&gt;right()&lt;/FONT&gt; with a filler :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1764710976943.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/88124iA08FF3F7DA1DB7E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1764710976943.png" alt="hogi_0-1764710976943.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );

new column ("weight_8",  Character, Formula(right(Char(:weight),8,"0")))&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Dec 2025 21:30:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Keep-Leading-Zeros/m-p/916311#M107666</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-12-02T21:30:09Z</dc:date>
    </item>
  </channel>
</rss>

