Attribute Assistant Autonumber Method

2906
13
Jump to solution
08-25-2016 07:47 AM
JoeBorgione
MVP Emeritus

In this discussion https://community.esri.com/thread/181774-how-is-auto-increment-supposed-to-work a couple of ideas were tossed around,  and Jake Skinner‌ suggested using the AUTONUMBER method to sequentially increase a unique ID.

I just gave this method a try for the first time and it does not seem to work for me.  I would like to deploy this method on the MASTER STREET NAME table within the LGIM and right now I'm working with a small test set of records.  Prior to adding this method to the DyanmicValue table , I added a new field of long int type, calling it MASTERSTREETS_ID and calculating all the existing records to equal the OID, just to establish the numbering sequence.  I then added a new record to the DynamicValue using the AUTONUMBER value method, setting the On Create field to TRUE and the On Change to false.  According to http://solutions.arcgis.com/shared/help/attribute-assistant/tools/attribute-assistant-methods/#auton...

there is no Value Info needed, so I left it <NULL>.

However, when I add a new record, I get a value of 1 in the MASTERSTREETS_ID field.  Not what I was hoping to get. I must be missing something but not sure what....

jskinner-esristaff

mlhotz

mmiller-esristaff

That should just about do it....
Tags (1)
0 Kudos
13 Replies
JeffreyWarren
New Contributor III

I'm jumping in a bit late here, but couldn't you use the 'Generate_ID' method to get the same results?  That is what we use to generate our ID's for all of our features.  

If you want to keep your original ID's, just do a sort and find the highest number, then create a record in the GenerateID table called MasterStreetID (or whatever) and put the ID that you found above in the 'SEQCOUNTER' and interval it by 1. Then create a record in the DynamicValue table for your masterstreets_ID and use the generate_ID method.  Works well for us.  Below is an example from our set up.  We have a field that contains our old ID's and I did exactly what I mentioned above.  Then I use the generate_ID method to get the next number.  We also use our map Grid (not necessarily needed for streets) in our ID so, using an expression I combine the grid w/the oldid column (which is autonumbered now) and we get our unique ID.

JoeBorgione
MVP Emeritus

Yes, that's exactly what I've done, but the auto number method dosen't require the additional table and associated maintenance.

That should just about do it....
0 Kudos
JeffreyWarren
New Contributor III

I agree. I believe the generateid table is best for when you have multiple feature classes that you want to share an ID sequence.  We are in the scenario where we have fittings, manholes, inlets, etc. that our departments want to just call S-*123, because they are all "structures", even though they are each in their own feature class.  So, autonumber would not work for us.  And granted there really is no maintenance per se, just the time to create the 1 record in the generateid table and add the record in the dynamic value table.  Just depends which flavor you prefer.  Good luck.

JoeBorgione
MVP Emeritus

Having a more 'universal' id make does good sense.  I'm going to take a closer look at that, as it may prove handy in my application as well.  Thanks!

That should just about do it....
0 Kudos