Error Message
The following generic error can sometimes occur when working with the Field Calculator or the Calculate Field tool:
ERROR 999999: Error executing function. The value type is incompatible with the field type. Failed to execute (CalculateField).
This error can be seen when attempting to calculate values that are invalid for the particular field type. ArcMap treats the error message as a warning and tries to complete the calculation for only the values that are valid for the field type.
Cause
The error can occur due to the following reasons:
- Using an incorrect field data type for the value that is being calculated. For example, a field with the short integer data type can only handle short integers from -32,768 to 32,768, and does not support long numbers, which are too large for the field. To calculate these large values, the field must be converted to the long integer data type. For more information on different field data types, refer to ArcGIS field data types.
- The attribute table contains two fields with the same alias field name.
- Using incorrect Python syntax when assigning the null field value in the Calculate Field window.
Solution or Workaround
Depending on the cause, select one of the options below to resolve the issue:
- Change the existing field data type to a suitable data type. For more information on changing the data type, refer to How To: Change the data type for an existing field.
- Remove the duplicate field in the attribute table. In the attribute table, right-click the duplicate field name, and select Delete Field.
- A null value is assigned to represent the absence of a value. To assign null values to a field, in the Calculate Field window use None for Expression, and select PYTHON for Expression type. Click OK to run the Calculate Field tool.
For more information on null values, refer to Calculate Field examples - Calculating null values.