HOW TO

Create a domain from the existing values in a table

Last Published: April 26, 2020

Summary

A domain is a declaration of acceptable attribute values. Using domains helps ensure data integrity by limiting the choice of values for a particular field. In some cases, the values are pre-defined in a table and users want to set the values to a domain so that only the values within the domain are valid for the field.

The instructions provided describe how to create a domain from the existing values in a table.

Procedure

1. Use the Summary Statistics tool to calculate the summary statistics for the field in the feature class.
Note:
Ignore if the Error 000800 is displayed.
  1. In the Catalog window, navigate to System Toolboxes > Analysis Tools > Statistics > Summary Statistics.
  2. Select the feature class as the input table.
  3. Select the output table location.
  4. Select the required field as the statistics field.
  5. Click the field under the Statistics Type column, and select FIRST from the drop-down list.
  6. Select the same field as the case field.
    The Summary Statistics tool
  7. Click OK. A new table is created.
2. Use the Table To Domain tool to create a coded value domain with values from the table.
Note:
Leave Domain Name, Domain Description, and Update Option at default values.
  1. In the Catalog window, navigate to System Toolboxes > Data Management Tools > Domains > Domain To Table.
  2. Select the output from the Summary Statistics tool as the input table.
  3. Select the same field used in the Summary Statistics tool as the code field.
  4. Select the same field as the description field.
  5. Select the file geodatabase as the input workspace.
  6. Click OK.
    The Table to Domain tool
3. In the Catalog window, right-click the file geodatabase > Properties > Domains tab. Ensure the coded value domain is created successfully.
Database Properties window
4. Select the domain.
  1. In the Catalog window, right-click the feature class to which the domain is assigned in the file geodatabase, and click Properties.
  2. Click the Fields tab.
  3. Select the field, click the empty field next to Domain, and select the domain from the drop-down list.
    Feature Class Properties window
  4. Click OK.
5. Reload the feature layer in the map, and start an edit session on the feature layer.
6. Open the attribute table of the feature layer, and click the field which the coded value domain is set. The drop-down list is displayed under the field.
Attribute Table with domains

Article ID:000013431

Software:
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic