<?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: Leading Zeros for Facility ID in Feature Class using Attribute Rules and Arcade in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1254835#M65086</link>
    <description>&lt;P&gt;I was in a similar situation. Using Attribute Rules to create an id, however didn't need the concatenate. The Text(Sequential Number, '0000') worked perfectly for adding leading zeros to your unique id with arcade expression in the attribute rules. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 14:32:17 GMT</pubDate>
    <dc:creator>RichardLittlefield</dc:creator>
    <dc:date>2023-02-03T14:32:17Z</dc:date>
    <item>
      <title>Leading Zeros for Facility ID in Feature Class using Attribute Rules and Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032632#M38118</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to generate Facility IDs for my Water Meter feature class in ArcGIS Pro using Attribute Rules. This is the code I have so far, but I need to figure out how to add leading zeros, or decimal places to the ID. What I come up with is "wMET3" and I would like "wMET003".&amp;nbsp; Any insight would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnnaPeters_0-1614808376018.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7440i036237B40A0B036C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnnaPeters_0-1614808376018.png" alt="AnnaPeters_0-1614808376018.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;if(isempty($feature.FACILITYID)) return concatenate("wMET" + nextsequencevalue("wMeterSeq"));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 21:54:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032632#M38118</guid>
      <dc:creator>GISUSER6</dc:creator>
      <dc:date>2021-03-03T21:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros for Facility ID in Feature Class using Attribute Rules and Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032638#M38119</link>
      <description>&lt;P&gt;Put your sequence value into the &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#text" target="_self"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&lt;/A&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#text" target="_self"&gt; function&lt;/A&gt;. In the &lt;EM&gt;format&lt;/EM&gt; parameter, a '0' is a mandatory digit, which will appear as a leading zero if the sequence is not that high yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;var seq_num = 3

return 'Meter' + Text(seq_num, '0000')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Returns:&lt;/P&gt;&lt;PRE&gt;'Meter0003'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 22:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032638#M38119</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-03T22:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros for Facility ID in Feature Class using Attribute Rules and Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032645#M38120</link>
      <description>&lt;P&gt;I have not worked with this in Pro Attribute Rules but the &lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/" target="_self"&gt;Concatenate function in Arcade&lt;/A&gt; is&amp;nbsp;Concatenate( values, separator?, format? ).&amp;nbsp; Try using the following in your return:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Concatenate(['wMET', nextsequencevalue("wMeterSeq")], '', '000')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 22:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032645#M38120</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2021-03-03T22:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros for Facility ID in Feature Class using Attribute Rules and Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032829#M38137</link>
      <description>&lt;P&gt;Both of these processes worked. Thanks so much!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 13:21:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032829#M38137</guid>
      <dc:creator>GISUSER6</dc:creator>
      <dc:date>2021-03-04T13:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros for Facility ID in Feature Class using Attribute Rules and Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032833#M38138</link>
      <description>&lt;P&gt;I'm so used to concatenating w/ a "+" I completely forgot about that. Nice!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 13:27:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1032833#M38138</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-04T13:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros for Facility ID in Feature Class using Attribute Rules and Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1254835#M65086</link>
      <description>&lt;P&gt;I was in a similar situation. Using Attribute Rules to create an id, however didn't need the concatenate. The Text(Sequential Number, '0000') worked perfectly for adding leading zeros to your unique id with arcade expression in the attribute rules. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 14:32:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/leading-zeros-for-facility-id-in-feature-class/m-p/1254835#M65086</guid>
      <dc:creator>RichardLittlefield</dc:creator>
      <dc:date>2023-02-03T14:32:17Z</dc:date>
    </item>
  </channel>
</rss>

