I have a feature class in SDE that has various fields where the setting AllowNulls is set to FALSE.

When creating a feature in ArcMap in this feature class it still allows nulls to be specified in the attributes, albeit an empty text string. I can then save my edits without any error messages.

What's going on?

Thanks Rob


I think you are confusing an Empty String, with a NULL Value.

An Empty String is a unique string of length zero. This means that there are data in the field that represent a string.

That is different than a Null, which indicates that data do not exist.

To test for this, try selecting a feature in the attribute table, then calculate values on the field. In the field calculator, type NULL.

enter image description here

If it is working correctly, it should throw an error when you try to do this.

  • Yes the calculator won't work by that still doesn't work for features created in an edit session. So when created they just have empty string of which is accepted. Even if I specify NULL or <Null> as the default value in the feature class properties it still doesn't prompt the user to enter values. Any ideas? – Rob Jun 8 '12 at 7:28

Seems to be by design:

Allow Nulls—This controls whether the field will have a NOT NULL constraint on it when the field is created. If "Allow Null Values" is set to "No," the field definition in the database will contain the NOT NULL constraint. If, on the other hand, you stay with the default of "Yes," the field will be NULLABLE.

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 has a NOT NULL constraint on it. The Allow Null Values property of a field cannot be changed once the field has been added to the feature class or table. Allow Null Values = NO cannot be specified for a field being added to a feature class or table that is already populated.


  • There is no way to override this to force the user to enter a value? – GravitaZ Jan 25 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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