Allow Null grayed out

92
3
Jump to solution
a month ago
Labels (2)
MatthewSyvertson
Occasional Contributor II

I am trying to customize my database to include better quality control.  There are some fields that I never want null.  So, I go to "field design" and attempt to unselect the "Allow NULL"  option in the fields I would like to never have blank, but they are all "grayed out" and I cannot change them.  See the screen shot below:

MatthewSyvertson_0-1653672362382.png

 

Any ideas how I can fix this issue?

0 Kudos
1 Solution

Accepted Solutions
Robert_LeClair
Esri Frequent Contributor

Is your database a file geodatabase by chance?  My guess is this is not availabe in the file geodatabase format.  If you are using a RDBMS such as SQL Server, you can use SQL Server Management Studio to set a "not null constraint" on an attribute field.  

In SQL, it would be:
alter table <owner>.<feature class>
alter column <column name> int not null

Hope this helps!

View solution in original post

3 Replies
DanPatterson
MVP Esteemed Contributor

If the gdb contains data, it can't be changed

Modify field properties—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
Robert_LeClair
Esri Frequent Contributor

Is your database a file geodatabase by chance?  My guess is this is not availabe in the file geodatabase format.  If you are using a RDBMS such as SQL Server, you can use SQL Server Management Studio to set a "not null constraint" on an attribute field.  

In SQL, it would be:
alter table <owner>.<feature class>
alter column <column name> int not null

Hope this helps!

MatthewSyvertson
Occasional Contributor II

This worked.  Thank you.