Select to view content in your preferred language

best method to prevent null attribute values

372
5
06-16-2024 09:38 PM
joecastellana
New Contributor III

Hello all,

We have several feature attributes that require values and are using different methods to enforce population: contingent values, attribute rules, and the "allow null" check box on the attribute itself. 

In order to enforce population, what would be the best practice method of the above options? This attribute is not related to other attributes, not a network attribute (we use a utility network model), and not dependant on sub-type. 

My initial thought was the simplest method would be to de-select the "null allowed" field on the attribute itself. Any other consequence of that method?

Thanks, 

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

Have you tried to deselect that property for a field?

I was under the impression that it only works for an empty table

table.png


... sort of retired...
0 Kudos
joecastellana
New Contributor III

Im glad Im not the only one thinking this is complicated 😉

0 Kudos
Robert_LeClair
Esri Notable Contributor

If you're using an Enterprise geodatabase, you can use a NOT NULL constraint on the field(s) of interest.  You can learn the SQL code to do this here.

joecastellana
New Contributor III

Good info there, thanks for sharing.

0 Kudos
joecastellana
New Contributor III

Thanks all, I'll go with a contingent value in this case as we've used that solution on another field so at least it will be consistent. 

0 Kudos