<?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: automatic sequential numbering when creating objects in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/automatic-sequential-numbering-when-creating/m-p/1689804#M102298</link>
    <description>&lt;P&gt;Hi Joe!&lt;BR /&gt;&lt;BR /&gt;I was able to use the NextSequenceValue in our test environment, but in our case, there was only one parameter for that -- the name of the sequence we generated with the "Create Database Sequence" tool.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We followed along with this set of examples:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expression.htm" target="_blank" rel="noopener"&gt;Attribute rule script expression examples—ArcGIS Pro | Documentation&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It was a little touchy getting the sequence name just right (i.e,&amp;nbsp;&lt;EM&gt;schemaOwner.YourSequenceName&lt;/EM&gt;), and we had some conflicting locks (because of course we had our feature table open while we were tinkering) -- but once we had the sequence created and named, the attribute rule properly validated and saved, then, our new features were getting their sequential integer!&lt;BR /&gt;&lt;BR /&gt;That said, we&amp;nbsp;&lt;EM&gt;did&amp;nbsp;not&lt;/EM&gt; try to convert the integer to text -- so that's another step!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Just for completeness sake, I've included a screenshot of our attribute rule as configured for a DBO schema, where our expression is simply:&lt;BR /&gt;&lt;BR /&gt;return NextSequenceValue("DBO.TEST_RULES_PTS_sequence")&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rule.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149658i1A9080296A319A4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="rule.jpg" alt="rule.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;______________________&lt;BR /&gt;&lt;BR /&gt;Richard's suggestion is good too!&amp;nbsp; But our DBA's have advised us to try to keep our work in ArcGIS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Mar 2026 11:42:29 GMT</pubDate>
    <dc:creator>D_Atkins</dc:creator>
    <dc:date>2026-03-11T11:42:29Z</dc:date>
    <item>
      <title>automatic sequential numbering when creating objects</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/automatic-sequential-numbering-when-creating/m-p/1689618#M102277</link>
      <description>&lt;P&gt;I have an ArcSDE with several tables. I want to create a new field in each table. This field should be filled automatically when the object is created. The field should contain a six-digit sequential number, i.e., 000001 for the first object, 000002 for the second object, and so on.&lt;/P&gt;&lt;P&gt;I have already tried using the tool enerate database sequence and arcade in the attribute rules, but I cannot achieve the desired result.&lt;/P&gt;&lt;P&gt;Arcade Code&lt;BR /&gt;&lt;BR /&gt;var v = NextSequenceValue($datastore, "SEQ_KNR");&lt;BR /&gt;return Text(v, "000000");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I use ArcGIS Pro 3.3&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2026 09:43:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/automatic-sequential-numbering-when-creating/m-p/1689618#M102277</guid>
      <dc:creator>JoeGerner</dc:creator>
      <dc:date>2026-03-10T09:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: automatic sequential numbering when creating objects</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/automatic-sequential-numbering-when-creating/m-p/1689710#M102288</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;H5&gt;My first question is why do you want the field to be TEXT in the database, could you not have it be an INT then just convert it in code when needed? Secondly, you did not say the database type, but if it is in SQL or SQLite you can add an autoincrement field to the table.&lt;/H5&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Copy code&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;CREATE&lt;/SPAN&gt; &lt;SPAN class=""&gt;TABLE&lt;/SPAN&gt; users (
    my_new_id &lt;SPAN class=""&gt;INTEGER&lt;/SPAN&gt; &lt;SPAN class=""&gt;PRIMARY&lt;/SPAN&gt; KEY AUTOINCREMENT,
    username TEXT &lt;SPAN class=""&gt;NOT&lt;/SPAN&gt; &lt;SPAN class=""&gt;NULL&lt;/SPAN&gt;,
    email TEXT &lt;SPAN class=""&gt;NOT&lt;/SPAN&gt; &lt;SPAN class=""&gt;NULL&lt;/SPAN&gt;
);&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;Auto-increment fields&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cannot be updated manually&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;unless explicitly allowed.&lt;/LI&gt;&lt;LI&gt;If you delete rows, the auto-increment counter&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;does not reset&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;unless you manually reset it.&lt;/LI&gt;&lt;LI&gt;Use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;BIGINT&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;instead of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;INT&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;if you expect very large numbers.&lt;/LI&gt;&lt;LI&gt;you can set a 'start' number for the sequence as well.&lt;/LI&gt;&lt;LI&gt;an autoincrement field DOES NOT have to be a primary key (or a key at all)&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Mar 2026 16:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/automatic-sequential-numbering-when-creating/m-p/1689710#M102288</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2026-03-10T16:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: automatic sequential numbering when creating objects</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/automatic-sequential-numbering-when-creating/m-p/1689804#M102298</link>
      <description>&lt;P&gt;Hi Joe!&lt;BR /&gt;&lt;BR /&gt;I was able to use the NextSequenceValue in our test environment, but in our case, there was only one parameter for that -- the name of the sequence we generated with the "Create Database Sequence" tool.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We followed along with this set of examples:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expression.htm" target="_blank" rel="noopener"&gt;Attribute rule script expression examples—ArcGIS Pro | Documentation&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It was a little touchy getting the sequence name just right (i.e,&amp;nbsp;&lt;EM&gt;schemaOwner.YourSequenceName&lt;/EM&gt;), and we had some conflicting locks (because of course we had our feature table open while we were tinkering) -- but once we had the sequence created and named, the attribute rule properly validated and saved, then, our new features were getting their sequential integer!&lt;BR /&gt;&lt;BR /&gt;That said, we&amp;nbsp;&lt;EM&gt;did&amp;nbsp;not&lt;/EM&gt; try to convert the integer to text -- so that's another step!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Just for completeness sake, I've included a screenshot of our attribute rule as configured for a DBO schema, where our expression is simply:&lt;BR /&gt;&lt;BR /&gt;return NextSequenceValue("DBO.TEST_RULES_PTS_sequence")&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rule.jpg" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149658i1A9080296A319A4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="rule.jpg" alt="rule.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;______________________&lt;BR /&gt;&lt;BR /&gt;Richard's suggestion is good too!&amp;nbsp; But our DBA's have advised us to try to keep our work in ArcGIS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 11:42:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/automatic-sequential-numbering-when-creating/m-p/1689804#M102298</guid>
      <dc:creator>D_Atkins</dc:creator>
      <dc:date>2026-03-11T11:42:29Z</dc:date>
    </item>
  </channel>
</rss>

