Select to view content in your preferred language

How to imcrement numbers automatically in a FC's atrribute table?

1160
6
06-16-2011 03:34 AM
VaL
by
Occasional Contributor
Hi
I have a FC in personal GDB and SDE GDB.
Is there any way I can have a number automatically incremented in a field, but this number should be always incremented even between different editing sessions. E.g.
session 1:
Starts with 100
for each feature added the number goes +1 in the field automatically.100 features added.
Session 2
Starts with 200 and keeps growing by 1.

Any solution for PGDB or SDE GDB welcomed
Tags (2)
0 Kudos
6 Replies
JonWebb
Emerging Contributor
0 Kudos
VaL
by
Occasional Contributor
Does this do what you want?

http://support.esri.com/en/knowledgebase/techarticles/detail/27427


Hi thanks for that.
But, no, it isnt what I need. This will create sequential numbers AFTER all features are digitized.
I need something which will create the sequence AT THE TIME of digitizing a feature. I.e. you draw a line and its seq. attribute is auto filed with a unique number.
0 Kudos
JonWebb
Emerging Contributor
Isn't that what the ObjectID attribute does? Or do you want the unique attribute to be within a specified range?
0 Kudos
VaL
by
Occasional Contributor
Isn't that what the ObjectID attribute does? Or do you want the unique attribute to be within a specified range?


Yes, this is what ObjectID does. But I need it to be done for another field in the same automated way at the time of adding a feature to the FC.
It would be good to be in a specified range but it will do even if it is from 1.
0 Kudos
JoeBorgione
MVP Emeritus
If you are working with some flavor of SDE, you can create a trigger that gets pulled when the delta table gets updated; this trigger updates the field.  With incremental numbers it gets a little tricky, but I've seen posts that discuss it.
That should just about do it....
0 Kudos
VaL
by
Occasional Contributor
If you are working with some flavor of SDE, you can create a trigger that gets pulled when the delta table gets updated; this trigger updates the field.  With incremental numbers it gets a little tricky, but I've seen posts that discuss it.


I do have SDE on Oracle.
I have investigated this option as it seems logical.
The problem is that when one want to edit a FC in SDE the FC must be registered as versioned.
From this moment on there are two delta tables that are created and the new features are added/deleted in the addition/deletion tables.
It is not in the original FC's table so this makes implementing triggers tricky if at all possible. Actually Oracle doesnt see the new features in the original FC, and SDE sees the in it but actually they are in the delta tables.
Could you point me to these posts?
Thanks
0 Kudos