PROBLEM

Creating a short integer field for a shapefile in ArcGIS Desktop converts the field to a long integer field

Last Published: January 7, 2021

Description

When creating a new field for a shapefile in ArcGIS Desktop, it is recommended to choose the data type which consumes the least storage space to improve performance. In some instances, when creating a field, the field's data type changes to long integer despite specifying the data type as short integer.

Note:
In ArcGIS Pro, the field's data type is displayed as 'Short' or 'Long' instead of 'Short Integer' or 'Long Integer.'

For example, the Add Field dialog box in ArcMap below displays the ‘Rank’ field created with the Short Integer data type and a Precision of ‘0’.

Image showing the Add Field dialog box when creating the Rank field.

After the field is created, the data type changes to ‘Long’ and the Precision is ‘5’ when viewing the field properties in ArcMap, as shown in the image below.

Image showing the field's data type is long integer instead of short integer and the precision changes to 5.

Cause

This is by design for ArcGIS 10.6.1 and later. A long integer field is created with a precision of five by default, if the precision is unspecified, zero, or has a value from five to ten.

Solution or Workaround

Once created, a field’s data type in a shapefile or a database table cannot be modified. Depending on the software, follow either of the workarounds below to create a short integer field, set the precision, and populate the new field with the values from the existing field.

Note:
When creating a new field, input a precision of 1, 2, 3, or 4. The precision determines the field length. Negative numbers require additional precision to store the negative sign.

ArcMap

  1. In ArcMap, open the shapefile, and open the attribute table.
  2. Create a short integer field.
  3. Calculate the existing field's values into the new field using the Field Calculator. Refer to Procedure B in How To: Calculate field values from an existing field to a new field in ArcMap for the steps to do so.

ArcGIS Pro

  1. In ArcGIS Pro, open the shapefile.
  2. Create a short integer field, and populate it with the existing field's values using the Calculate Field tool. Refer to How To: Change the data type of an existing field in ArcGIS Pro for steps to use the Calculate Field tool.

Article ID:000024717

Software:
  • ArcMap

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