ERROR

ERROR 160145: The field is not nullable

Last Published: June 27, 2023

Error Message

Performing a calculation that includes null values on a field in an attribute table using the Calculate Field tool fails and returns the following error:

Error:   
ERROR 160145: The field is not nullable.
Error 160145: The field is not nullable

Cause

  • The Calculate Field tool is used to calculate values of a field in a shapefile. Shapefiles are independent layers inside of a folder and shapefiles are not nullable.
  • The Allow NULL field setting is not checked. Some fields are also not nullable by default, for example, the OBJECTID or GLOBALID field.

Solution or Workaround

Export the shapefiles into feature classes

To calculate a null field, export the shapefile to a feature class. Refer to ArcGIS Pro: Export shapefiles for instructions.

Run the calculation on a different field or create a new nullable field in the attribute table

  1. Add a new field with the same data type. Refer to ArcGIS Pro: Add field (Data Management) for instructions. Ensure the Allow NULL check box is checked when creating the new field.
Allow NULL checkbox is checked when creating the new field.
  1. Populate the new field with the same values as the desired field. Refer to How To: Copy field values to another field in ArcGIS Pro for instructions.
  2. Run the Calculate Field tool on the new field.

Article ID:000030307

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 9x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options