How to automatically create ID for existing feature classes?

10-19-2023 07:25 AM
Labels (3)
New Contributor


Just wondering that could I automatically to create IDs for the existing feature classes?


For example, I have pipes in the database already, the PIPEID fields are all Null, but I do not want to given them the IDs one by one.



How could I do something to create the IDs automatically.

Your help is appreciated. 

Thank you.


0 Kudos
3 Replies
Occasional Contributor II

Do you have a certain way you want to ID them? Or just 1,2,3, etc?

0 Kudos
Esri Regular Contributor

One way to accomplish this would be to write an attribute rule that would run every time a feature is created to give it a unique ID using a sequence. Then what you can do is take that arcade expression and use it in the calculate field tool on this layer (just make sure you set the language to Arcade).

Occasional Contributor II Here is a YouTube Video explaining how to assign a simple number to the list. 

In words, left click on the field header and choose calculate field. The expression type must be Python 3. 

In the "Helpers" group type (or scroll to) S and click Sequential Number, then apply. This will automatically give numbers to your items in order.