<?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: Attribute Rule for Ugly ID Format in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-ugly-id-format/m-p/527950#M32</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var numval = Text(64600)&lt;/P&gt;&lt;P&gt;var padCount = 10;&lt;/P&gt;&lt;P&gt;for (var i = Count(numval);i&amp;lt;padCount;i++){&lt;/P&gt;&lt;P&gt;    numval = "0" + numval&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;return numval&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:15:36 GMT</pubDate>
    <dc:creator>MikeMillerGIS</dc:creator>
    <dc:date>2020-09-29T15:15:36Z</dc:date>
    <item>
      <title>Attribute Rule for Ugly ID Format</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-ugly-id-format/m-p/527949#M31</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a series of id values that look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PWOPS_pave00000001 through&lt;/P&gt;&lt;P&gt;PWOPS_pave00063681&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can create a geodatbase sequence easy enough to start at 63682 and increment by 1 but concatenating it with a potentially varying number of zeros has me scratching my head. In python one can use the &lt;A href="https://www.w3schools.com/python/ref_string_zfill.asp"&gt;zfill() method&lt;/A&gt; to pad zeros; is there way in Arcade to emulate that?&amp;nbsp; I didn't see anything in &lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/"&gt;the text functions&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:10:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-ugly-id-format/m-p/527949#M31</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-09-29T15:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule for Ugly ID Format</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-ugly-id-format/m-p/527950#M32</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var numval = Text(64600)&lt;/P&gt;&lt;P&gt;var padCount = 10;&lt;/P&gt;&lt;P&gt;for (var i = Count(numval);i&amp;lt;padCount;i++){&lt;/P&gt;&lt;P&gt;    numval = "0" + numval&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;return numval&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:15:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-ugly-id-format/m-p/527950#M32</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2020-09-29T15:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule for Ugly ID Format</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-ugly-id-format/m-p/527951#M33</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But in &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#text" rel="nofollow noopener noreferrer" target="_blank"&gt;data functions&lt;/A&gt;&amp;nbsp; you can the Text()n function like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Text(63682, '0000000000')

// will return

0000063682

// or

Text(163682, '0000000000')

//which returns

0000163682&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:00:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-for-ugly-id-format/m-p/527951#M33</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-11T23:00:00Z</dc:date>
    </item>
  </channel>
</rss>

