Auto Populating a Unique ID Field

2175
3
Jump to solution
10-20-2015 09:57 AM
Highlighted
New Contributor III

I'm currently working off a versioned SDE database and I'm trying to symbolize a unique id for point and line features.  Usually I just symbolize off the OID but this number cannot change.  Sometimes the point or line may get deleted and recreated.  I have no issue with pulling the unique Id out and reentering it but as most of you know this is not possible to do with an OID. 

So, is it possible to have a unique id field that automatically inputs a value one higher than the previous version?  If that is not possible is there a way to automatically copy the OID into another field so it's editable?

Thanks!

~alex

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Regular Contributor
3 Replies
Highlighted
Regular Contributor III

I haven't seen an automated way of creating a incremented unique id field. You could create a field and use the field calculator to populate using the object ID field see below.

Reply
0 Kudos
Highlighted
MVP Regular Contributor
Highlighted
Regular Contributor II

For non-ArcObjects programmers or users that wants an out-of-the-box option you'll want to use Tim's solution. The attribute assistant provides a mechanism that does this. Otherwise you could implement a feature class extension in ArcObjects to handle this.