<?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: Database Sequence Number Reuse in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1221104#M34287</link>
    <description>&lt;P&gt;Correct.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Oct 2022 14:23:21 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-10-12T14:23:21Z</dc:date>
    <item>
      <title>Database Sequence Number Reuse</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1220913#M34281</link>
      <description>&lt;P&gt;My question is a bit a of a two fold situation. I am looking into creating a database sequence for feature in our Enterprise database for creating unique IDs.&lt;/P&gt;&lt;P&gt;I can't find any documentation that addresses the following. If a number is used for a feature in a class and then that feature is deleted, when a new feature is inserted does that number get reused or is it burned, and the next unused number comes up?&lt;/P&gt;&lt;P&gt;My second question is, can the sequence be used in 'Calculate Field'? I would use this in the attribute rules, but the data is existing, and I would need to run it for the first time manually.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 22:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1220913#M34281</guid>
      <dc:creator>GarretGiordanoTOLE</dc:creator>
      <dc:date>2022-10-11T22:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Database Sequence Number Reuse</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1220995#M34285</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;If a number is used for a feature in a class and then that feature is deleted, when a new feature is inserted does that number get reused or is it burned, and the next unused number comes up?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;The database sequence doesn't know and doesn't care about where its values are used. All it does is count up when you say so. So when you delete and then insert a feature, the sequence will count up.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Just to clarify: The number isn't "burned", and the next number isn't "unused". These concepts would imply that the sequence has knowledge of where the values are used. It does not have that knowledge. It counts up.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;can the sequence be used in 'Calculate Field'?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Yes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Personally, my unique key rules look like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Calculation rule on the key field
// triggers: Insert, Update

// if the key field is empty, get the next value of the sequence
// else return what's already in there
return IIF($feature.KeyField == null, NextSequenceValue("SequenceName"), $feature.KeyField)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 06:27:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1220995#M34285</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-10-12T06:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Database Sequence Number Reuse</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1221063#M34286</link>
      <description>&lt;P&gt;Thank you for your response! As a point of clarification, lets say we have 5 features in a class ID's assigned are 1,2,3,4,5. We delete feature 3 and then insert a new feature. That would mean our 5 remaining features would be numbered 1, 2, 4, 5, 6 correct?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 12:55:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1221063#M34286</guid>
      <dc:creator>GarretGiordanoTOLE</dc:creator>
      <dc:date>2022-10-12T12:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Database Sequence Number Reuse</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1221104#M34287</link>
      <description>&lt;P&gt;Correct.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 14:23:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/database-sequence-number-reuse/m-p/1221104#M34287</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-10-12T14:23:21Z</dc:date>
    </item>
  </channel>
</rss>

