Trying to use Coded Value Domains with Allow Null Values = No in a File GDB, ArcGIS 10.2. Through an GIS.SE question that I can't seem to find again, I found this through ArcGIS help:

"Note: The geodatabase model is such that it will insert an empty value (numeric = 0, text = "") instead of a database NULL if, and only if, the field in the database has a NOT NULL constraint on it."

I get that this prevents Null values from being entered. But it defaults to blanks or zeros, which overrides my domains when a new feature is created! So someone can add a feature and accept 0 in a field that has a coded value domain, which to some degree defeats the purpose of having the Coded Value domain to force certain values.

What I would like is to force someone to select a value before it will allow the feature to be saved. I thought this was the point of a domain?

Am I missing something or not understanding something about databases? Is this just a limitation, or am I trying to get it to do something that it inherently shouldn't do?

1 Answer 1


The behaviour you describe is correct. All because you give a field a domain and set field to not allow NULLS does not mean that ArcMap will capture the fact they the user may not touch that field during editing. So when they save edits they can insert a nothing even though you have a domain.

There are 2 routes here:

  1. Accept this odd behaviour then do some post edit validation through the Validate Features button on the Editor tool bar.
  2. Add to your domain list an "Unknown" value lets say UNK code and set that to be the default value for the field. Thus a user can create a feature, not touch that field but it has a valid domain value (in this case UNK). It would be up to you/them to then search for UNK values and resolve.
  • That's what I was afraid of. Ultimately, this is a concern for data collection in the field with Collector, where it is preferred that someone has to choose a value for some fields (e.g. an outcrop has to have an outcropType). I've read that they are working on ways to set this up in AGOL/collector and that even now there is a work around. But I figured it'd be best to set this functionality in the backend, if possible. Thanks
    – Tangnar
    Commented Apr 18, 2016 at 13:01

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.