Enforcing unique values in field when editing in ArcMap?

You are not supposed to edit your personal geodatabase from MS Access since this may corrupt your geodatabase and introduce unexpected behaviour. In file and personal geodatabase, you are working with feature classes and tables each of which already has an unique ID field, i.e., ObjectID.

ObjectID, however, can be easily changed when a feature is updated or modified, so you should not depend on the ObjectID field in your database design. This field is used internally within the ArcGIS. Your option is to create a new field which you will take care yourself and make it a "key" field, however as you probably know each table can only have one unique index and it is already taken for the ObjectID field, that is why you are getting this kind of message. You will need to make sure that the field you will create yourself is unique through custom approach, such as setting up a geodatabase domain with pre-defined values, which user will be able to choose from. You could also use triggers to make sure that the values you enter into the field are unique.

If you need more advanced relational database design, you will need to move to an enterprise geodatabase, because the DBMS provides better support for this kind of operations. I have multiple feature classes with in SQL Server database that have unique constraints.

It is worth noting that, in ArcMap, when you edit attribute fields of an SDE feature class for which you have set the unique constraint in SQL Server, and try to enter an existing value in a field with defined unique constraint, you will get an error message and the value will not be entered.

enter image description here

Then you could use the Attribute Inspector (available from the Editing toolbar > Editor > Editing Options > Attributes tab). Check the Display the attributes dialog before storing new features option. This will allow you to enter attributes prior to writing rows to your database at the DBMS level.


You should create an index with unique constraint on the fields.

Just go to the property page of the table and then the index tab. Click the Add button.

This feature is only supported with ArcSDE SQL SERVER database. So with personal geodatabase it is not possible to have unique field in Arcmap and edit features.

enter image description here

As per Documentation:

Unique indexes The Unique option is not used in file geodatabases and can be left unchecked. The Unique option is available for SQL Server ArcSDE geodatabases; however, it is unavailable on the Add Attribute Index dialog box when the source data is a feature class that is registered as versioned.

When you create an index, you are presented with an option of creating the index as unique. Choose this option if the attribute has unique values in each record. This will speed query execution against this attribute, since the database can stop searching after the first matching value is found.

Note, however, that you cannot edit a feature class that has a unique index on a user-defined field in a personal geodatabase. Also, you cannot edit a feature class that is in a feature dataset with another feature class with a unique index on a user-defined field. When attempting to start editing a personal geodatabase, ArcMap returns this error:

Could not edit any of the map's layers. Check to see if a layer or table contains a unique index on a user managed column. If you have a unique index on a field in a personal geodatabase and need to edit, use ArcCatalog to drop the unique index and re-create it as a nonunique index.