Select to view content in your preferred language

Documentation about how to set value to null in attribute table

1496
6
02-07-2024 08:02 PM
Status: Already Offered
Labels (1)
Bud
by
Esteemed Contributor

Could information be added to the ArcGIS Pro documentation about the different ways to set a value to null in the Attribute Table? To help users understand how to enter data correctly in ArcGIS Pro.

For example, here are some old ArcMap instructions I wrote years ago:

  • Delete a value with the keyboard delete key or by cutting the value (ctrl+x). In an Oracle GDB, the value will be automatically set to null upon saving. 
    • Tip: Don’t select the record and hit the delete key – that will delete the entire record (not what we want).
  • Or, use the field calculator: set the value to null, but not <null>”.
  • Or, if the field has a domain, select <Null> from the picklist.
  • Incorrect: 

    Don’t try to set the value to the literal text “<null>” or "null". That’s not the same thing as it being truly nullNull isn’t a value. It’s the absence of a value.

Related: Documentation about empty strings, nulls, NaN, and Nil in ArcGIS

6 Comments
MErikReedAugusta

A quick note on your first bullet: If memory serves, that doesn't work consistently on Text fields.

I haven't tested it recently, so this warning might be obsolete, but in the past we frequently had issues where delete would give us an empty string, instead of a true NULL.  But doing it from the Attribute Pane or via Field Calculator could get us a true NULL.

 

More generally:
I kudo'd this, because I'm always in favor of more explicit documentation, but where would you imagine this should go in the documentation?

Bud
by

@MErikReedAugusta 

A quick note on your first bullet: If memory serves, that doesn't work consistently on Text fields.

I haven't tested it recently, so this warning might be obsolete, but in the past we frequently had issues where delete would give us an empty string, instead of a true NULL.  But doing it from the Attribute Pane or via Field Calculator could get us a true NULL.

Good point. Oracle doesn't have a concept of empty strings, so that's not an issue in Oracle EGDBs. But yeah, I remember being surprised that other GDBs, like file geodatabases, behaved differently since they do have a concept of an empty string.

Edit: I couldn't reproduce that issue in ArcGIS Pro 3.2.1 using a file geodatabase. So maybe that's been addressed?

I'm not sure about where this documentation would live. Maybe somewhere in the Edit Tabular Data section?  https://pro.arcgis.com/en/pro-app/3.1/help/data/tables/edit-a-value-in-a-table-cell.htm 

RandyCasey

Personally, I have found the easiest way is to select the records you want to set fields to Null, then open the Attributes pane, select the root feature class, then right click on the field you want to set Null. From the right click menu, select "Set to '<Null>'".

RandyCasey_0-1707413037273.png

 

Bud
by

If anyone's wondering, here are the docs for the functionality @RandyCasey mentioned:

Edit feature attributes:
https://pro.arcgis.com/en/pro-app/latest/help/editing/edit-feature-attributes.htm#:~:text=Set%20To%2...

 

KoryKramer
Status changed to: Already Offered

@Bud As pointed out on this thread, documentation already exists on how to set values to Null.

Here is the calculate field documentation: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field-examples.htm...

and a related knowledge article: https://support.esri.com/en-us/knowledge-base/how-to-assign-nulls-to-a-field-in-arcgis-pro-000027567

 

EmilianoDiMarco

Hi, I have this problem with ArcGis Pro.

Working on polygons and a data matrix linked to a map made in shapefile, I have areas that are ‘No data’. These areas I need to exclude, because in the calculation of percentage changes in a time series, for example, even the value =0 is a value that alters a distribution ranging from ≤0 to ≥0.

=0 would mean a stable value in time, which simply does not exist.

I have tried to do as you say in the example, but I always get an error message.

Obviously, the matrix of a shapefile does not allow <Null> values.

However, with Geoda I can exclude polygons that I do not want to calculate, by simply deleting the 0 from the matrix and leaving the field with no values.

I am amazed that such an essential function cannot be done with ArcGis Pro.

What should I do?