Add Field (Data Management)

AllSource 1.0    |

Summary

Adds a new field to a table or the table of a feature class or feature layer, as well as to rasters with attribute tables.

Usage

  • For shapefiles and dBase tables, if field type defines a character, blanks are inserted for each record. If field type defines a numeric item, zeros are inserted for each record.

  • The Field Length parameter is only applicable to fields of type text. If a length is not specified, the default length of 255 will be used.

  • For geodatabases, if field type defines a character or number, <null> is inserted into each record if the Field supports null values parameter is checked.

  • A nonnullable field cannot be added to a nonempty geodatabase feature class or table.

  • A shapefile does not support aliases for fields, so you cannot add a field alias to a shapefile.

  • You can use an existing domain from a feature class in a geodatabase for the Field Domain parameter value. The name of an existing domain must be provided. Providing an invalid domain name or value will not cause the tool to fail, but the invalid name or value will be ignored and no domain will be set for the field.

  • The precision and scale of a field describe the maximum precision and size of data that can be stored in the field. The precision describes the number of digits that can be stored in the field, and the scale describes the number of decimal places for float and double fields. For example, for a value of 54.234, the scale is 3 and the precision is 5.

    Note:

    Field precision and scale are not supported in a file geodatabase feature class or table. If you enter a value for precision or scale, it will be ignored.

    For other database types, use the following guidelines to choose the correct field type for a given precision and scale:

    • When you create a float or double field and specify a precision and scale, if the precision is greater than 6, use a double; otherwise, use a float.
    • For a field with a scale of 0, use a long or short integer field type. When creating a long integer field, specify a precision of 10 or less, or the field may be created as a double.

    Learn more about numeric field types

  • Required fields are permanent and cannot be deleted. To allow for deletion at a later time, set the field so it is not required (the default).

  • A field of type raster allows you to include a raster image as an attribute. It is stored in or alongside the geodatabase. This is helpful when an image is the best way to describe a feature. Precision, scale, and length cannot be set for fields of type raster.

Parameters

LabelExplanationData Type
Input Table

The input table to which the specified field will be added. The field will be added to the existing input table and will not create a new output table.

Fields can be added to feature classes in geodatabases, shapefiles, coverages, stand-alone tables, raster catalogs, rasters with attribute tables, and layers.

Mosaic Layer; Raster Layer; Table View
Field Name

The name of the field that will be added to the input table.

String
Field Type

Specifies the field type of the new field.

  • TextThe field type will be text. Text fields support a string of characters.
  • Float (32-bit floating point)The field type will be float. Float fields support fractional numbers between -3.4E38 and 1.2E38.
  • Double (64-bit floating point)The field type will be double. Double fields support fractional numbers between -2.2E308 and 1.8E308.
  • Short (16-bit integer)The field type will be short. Short fields support whole numbers between -32,768 and 32,767.
  • Long (32-bit integer)The field type will be long. Long fields support whole numbers between -2,147,483,648 and 2,147,483,647.
  • DateThe field type will be date. Date fields support date and time values.
  • Blob (binary data)The field type will be BLOB. BLOB fields support data stored as a long sequence of binary numbers. You need a custom loader or viewer or a third-party application to load items into a BLOB field or view the contents of a BLOB field.
  • Raster imageryThe field type will be raster. Raster fields can store raster data in or alongside the geodatabase. All ArcGIS software-supported raster dataset formats can be stored, but it is recommended that only small images be used.
  • GUID (globally unique identifier)The field type will be GUID. GUID fields store registry-style strings consisting of 36 characters enclosed in curly brackets.
String
Field Precision
(Optional)

The number of digits that can be stored in the field. All digits are counted regardless of which side of the decimal they are on.

This parameter is only applicable to fields of type float, double, short, or long.

If the input table is a file geodatabase, the field precision value will be ignored.

Long
Field Scale
(Optional)

The number of decimal places stored in a field.

This parameter is only applicable to fields of type float or double.

If the input table is a file geodatabase, the field scale value will be ignored.

Long
Field Length
(Optional)

The length of the field. This sets the maximum number of allowable characters for each record of the field.

This parameter is only applicable to fields of type text.

Long
Field Alias
(Optional)

The alternate name for the field. This name is used to describe cryptic field names. This parameter only applies to geodatabases.

String
Field supports null values
(Optional)

Specifies whether the field can contain null values. Null values are different from zero or empty fields and are only supported for fields in a geodatabase.

  • Checked—The field can contain null values. This is the default.
  • Unchecked—The field cannot contain null values.
Boolean
Field is required
(Optional)

Specifies whether the field being created is a required field for the table. Required fields are only supported in a geodatabase.

  • Checked—The field is a required field. Required fields are permanent and cannot be deleted.
  • Unchecked—The field is not a required field. This is the default.
Boolean
Field Domain
(Optional)

Constrains the values allowed in any particular attribute for a table, feature class, or subtype in a geodatabase. You must specify the name of an existing domain for it to be applied to the field.

String

Derived Output

LabelExplanationData Type
Updated Input Table

The updated input table.

Table

Environments