I have created a few feature classes on an SDE using ArcCatalog and initially when I created them I set "Allow null values" to yes. I was wondering if this can be changed back to "No"? It is ArcSDE 10.0 on Oracle 11g. I need to disallow null values to minimise the amount of time spent on QC of null values inserted by default by the user.

See attached screenshot

ArcSDE allow null values (ArcCatalog)

  • The "Allow NULL values" is a field setting, not a feature class setting. When adding new fields you can change this option, but I don't believe you can change it after the field has been created (without deleting and recreating the field) – Midavalo Feb 23 '17 at 16:05
  • Disallowing NULL will not force the user to enter a value. All this does is force ArcGIS to save an empty string "" instead of <Null>, so you're replacing one problem with another – Midavalo Feb 23 '17 at 16:40
  • My idea was to disallow null and apply a domain to the field so the user can simply choose the value. Faster than typing. – Daz Feb 23 '17 at 17:32
  • Data is never stored in "SDE" (which no longer exists). The proper term of art is "Enterprise Geodatabase", but you still need to specify exactly which database (and complete version), which can change answers. – Vince Feb 23 '17 at 20:05

I don't believe you can change the Allow Null values setting without recreating the field. You can not add a new field with Allow Null values set to No on a feature class that contains records.

In response to your comments, your idea to disallow Nulls and have a domain will still not force users to input a value. If they don't pick a value from the Domain, it will just be an empty string "" instead of a <Null>

To test I created a new feature class in my database (running on Microsoft SQL Express). The first field MyField1 disallows Nulls, and has a domain. The second field MyField2 disallows Nulls and has no domain, and third MyField3 allows Nulls and also has no domain.

enter image description here

I created three points, and left some of the fields blank. I was able to do this on all three fields, it doesn't force me to input on any field.

enter image description here

As you can see when I use the Identify tool on the points, MyField1 is blank (not Null) and MyField3 is Null - both of these fields I left blank when I added the point, it honoured the No Nulls by saving an empty string.

enter image description here

Even if you set the attribute window to pop up on feature creation (Editor > Options > Attributes), it still won't force you to enter any values, so Nulls/Blank values are still a possibility.

enter image description here

When Display attributes dialog before storing new features as enabled, it pops the attributes window up as soon as I create the point, but I can just click on OK to close it.

enter image description here

  • Dropping the table and recreating it is the supported mechanism. Sometimes you can use ALTER TABLE, but then you need to re-register the table with both the geodatabase and every service or map document is accessing it. – Vince Feb 23 '17 at 20:07
  • 1
    I remember a hack where you apply the domain to the field and set a default value on the field that is NOT in the domain. I think regular editing workflows will flag the value as invalid, thus forcing the user to pick a different value from the domain – Ben S Nadler Feb 24 '17 at 3:55
  • Interesting idea although in my experience domains do no validation which is why you can calculate any value in via field calculator. That said I'll give it a try later – Midavalo Feb 24 '17 at 3:59
  • Thanks for the replies. Seems the only way is to create new feature class. I tried the method stated by Ben and it did not force the user to choose from the domain on ArcMap 10.0. The domain was text based and I set a default value to something not in the domain. I will probably think about getting ESRI data reviewer once we upgrade 10.3. – Daz Feb 24 '17 at 11:31

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.