Select to view content in your preferred language

Creating unique ID based on count of three attributes

330
1
01-29-2026 10:42 AM
Labels (3)
JohnathanAdkins
Emerging Contributor

I am trying to create an unique ID for a dataset based on the count of three variables. The three variables are county (55 total), district (10 total), and type (9 total). The unique ID would preferred to be structured as so:

county number + district number + "-" + count of asset with a unique county/district/type + type abbreviation

For example, two different types of assets in the same county and district would have the same beginning of their unique ID, but the count of both of them would be different since they are different types of assets. I have attempted the Generating Sequential Number tool without luck. Could it be possible to work this into Attribute Rules to calculate this automatically. 

Any help would be appreciated!

 

 

0 Kudos
1 Reply
Brian_McLeer
MVP Regular Contributor

You may be able to use attribute rules with the insert checked on and combine it with a database sequence. Your attribute rule may need to work to compare against the intersecting polygon district as well and assigning it to that portion of the ID. @HusseinNasser2 has a great tutorial on the 1st link. 

https://community.esri.com/t5/attribute-rules-videos/generating-unique-ids-with-attribute-rules/td-p...

https://community.esri.com/t5/attribute-rules-questions/using-nextsequencevalue-to-restart-based-on/...

https://support.esri.com/en-us/knowledge-base/how-to-add-auto-sequential-values-using-attribute-rule...

0 Kudos