PROBLEM

Unable to insert numbers into a field in an attribute table of a feature class

Last Published: April 26, 2020

Description

In ArcMap, attempting to insert numbers into an attribute table is not allowed. Instead, a generic error such as the following is returned,"This number field can only have 2 digits to the left of the point."

Cause

This occurs due to the difference between the precision and scale of either a float or double type field with the input value.

Note:
Precision and scale of a field describe the precision and the maximum size of data which can be stored in a field. The precision describes the number of digits which can be stored in a field while scale describes the number of decimal places for double and float fields.


During the creation of an attribute table, the precision and scale of the table can be set to provide greater control. For example, if a field was created with the float data type with a precision of 4 and a scale of 2, the value 54.32 is accepted. However, an error message is displayed when a value of 54.321 is inserted in the field.

Solution or Workaround

Part 1
Create a new field in the feature class table using the Add Field geoprocessing tool, and specify the precision and scale of the new field.

1. Open ArcMap and navigate to ArcCatalog > Toolboxes > System Toolboxes > Data Management Tools > Fields > Add Field.
[O-Image]

2. Fill in the parameters of the new field, specify the precision and scale of the field, and click OK.
[O-Image]
Note:
For further explanation on the precision and scale of the fields, refer to the following ArcGIS Help document, ArcGIS field data types.


Part 2
Calculate values from the old field to the new field using the Field Calculator.

1. Right-click the new field > Field Calculator.
[O-Image]

2. In the Field Calculator, type the script as highlighted below, and click OK.

Code:
[New_Field]=[Old_Field]

    Article ID:000012424

    Software:
    • ArcMap

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options