The objective: Create a process where a coworker can open an .MXD, start editing, add a feature to represent a complaint, then add records in a related table to represent an inspection. Along the way, I want the coworker to be able to use a unique number that is auto-generated as part of a larger docket number.

I am using global IDs in a relationship class to relate the Complaint feature with the Inspections table. I am doing this so that I can easily hide the global ID field in the .MXD my coworker is using so there is no risk that they will accidentally break the relationship by changing the value.

The problem: The complaint feature needs to have another unique field with an incremental value that can be used to build a docket number. Object ID will not work because that can change, and because in an SDE environment the Object ID increases by 400 every editing session (before long the number would be way too large). So I basically need a project ID that will start at 0 or 1 and go up by one for every record that is added. I could then make this field read only in my coworkers .MXD so they can only view but not change it.

The kicker here is, I really want this process to be done automatically as soon as my coworker creates a new record during an editing session. I realize this is probably impossible, so is there a way to do it through a script that runs every night so the number is available for my coworker the next day? The important thing is that this number is always unique and is not repeated if, say, an earlier record is deleted (autoincrement field calculate would have this problem).

We are working with ArcGIS 10.2.2 in an SDE environment on a SQL server (I think Microsoft 2008 but not sure).

1 Answer 1


Esri's Attribute Assistant has a tool called Generate ID which will automatically generate a new ID whenever a new feature is created.

These IDs can be created per feature class to generate different IDs for different feature classes, and can be created based on a specific template if required.

  • This is exactly what I needed, thanks! I have have encountered another issue, perhaps you could help? I have set up the DynamicValue and GenerateId tables.The tool is working to create a unique project id for each new record. I also have another process set up in the DynamicValue table to then create a docket number using that project id. I can get the expression to work with other fields but it does not work when I use that project id field. Is is possible that the expression does not work if one of the fields being called has been created by the attribute assist tool?
    – Jacob DA
    Apr 20, 2016 at 17:42
  • @JacobDA for a new issue I recommend asking a new question and link back to this one if necessary. That way others will see it. If my answer worked then this question has been answered and now you have a new question as a result.
    – Midavalo
    Apr 21, 2016 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.