<?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: Using Attribute Rules to Create Sequential ID in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1679302#M101352</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;I had a datatype problem with you solution, I though I'd share mine in case anyone experienced anything similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;// Calculation Attribute Rule
// trigger: Insert
// field:centralAssetID

// get the latest feature with a centralAssetID
var prefix = "WG"
var last_feature = First(OrderBy(Filter($featureset, "centralAssetID IS NOT NULL"), "created_date DESC"))
// get the last centralAssetID and add 1
var seq = IIf(last_feature == null, 0, last_feature.centralAssetID)
var seq2 = Replace(seq, prefix, "")
var seq3 = Number(seq2) + 1

return prefix + text(seq3)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 22 Jan 2026 15:43:37 GMT</pubDate>
    <dc:creator>ChristopherMartyn</dc:creator>
    <dc:date>2026-01-22T15:43:37Z</dc:date>
    <item>
      <title>Using Attribute Rules to Create Sequential ID</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1320130#M72241</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi there, I was looking through the forum and couldn't find an exact solution to my problem.&lt;BR /&gt;&lt;BR /&gt;I am using ArcGIS Pro and want to create a new sequential number every time a new point feature is created within my layer. I first want to sort OBJECTID by descending, which would give me the last CW_ID I used. I then want the new feature to have a CW_ID one higher than the last one used. How would I do this using arcade and attribute rules?&lt;BR /&gt;&lt;BR /&gt;For example, if the last CW_ID after the OBJECTID sort was SAN6249, I want the new feature created to have a CW_ID of SAN6250 automatically. As a side note, each new CW_ID with start with SAN, so I am assuming there will have to be a split to isolate the integer and then a concatenation somewhere to recreate the string.&lt;BR /&gt;&lt;BR /&gt;Please let me know if you need any more details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 15:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1320130#M72241</guid>
      <dc:creator>ShaiBravo</dc:creator>
      <dc:date>2023-08-18T15:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Attribute Rules to Create Sequential ID</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1320347#M72264</link>
      <description>&lt;P&gt;The really easy way:&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-database-sequence.htm" target="_blank" rel="noopener"&gt;Create a database sequence&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Calculation Attribute Rule
// trigger: Insert
// field:CW_ID

var seq = NextSequenceValue("SequenceName")
return "SAN" + seq&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If for some reason you can't create sequences, you'll have to do it the harder way:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Calculation Attribute Rule
// trigger: Insert
// field:CW_ID

// get the latest feature with a CW_ID
var last_feature = First(OrderBy(Filter($featureset, "CW_ID IS NOT NULL"), "OBJECTID DESC"))
// get the last CW_ID and add 1
var seq = IIf(last_feature == null, 0, last_feature.CW_ID) + 1

return "SAN" + seq &lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Aug 2023 21:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1320347#M72264</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-08-18T21:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Attribute Rules to Create Sequential ID</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1321172#M72351</link>
      <description>&lt;P&gt;Thanks so much!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 15:02:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1321172#M72351</guid>
      <dc:creator>ShaiBravo</dc:creator>
      <dc:date>2023-08-22T15:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using Attribute Rules to Create Sequential ID</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1679302#M101352</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;I had a datatype problem with you solution, I though I'd share mine in case anyone experienced anything similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;// Calculation Attribute Rule
// trigger: Insert
// field:centralAssetID

// get the latest feature with a centralAssetID
var prefix = "WG"
var last_feature = First(OrderBy(Filter($featureset, "centralAssetID IS NOT NULL"), "created_date DESC"))
// get the last centralAssetID and add 1
var seq = IIf(last_feature == null, 0, last_feature.centralAssetID)
var seq2 = Replace(seq, prefix, "")
var seq3 = Number(seq2) + 1

return prefix + text(seq3)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Jan 2026 15:43:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-attribute-rules-to-create-sequential-id/m-p/1679302#M101352</guid>
      <dc:creator>ChristopherMartyn</dc:creator>
      <dc:date>2026-01-22T15:43:37Z</dc:date>
    </item>
  </channel>
</rss>

