How To: Apply domain values to a field using the Field Calculator
In some cases, it is desirable to apply the description of a coded value domain to multiple records within a field at a time. Rather than applying each domain value for each individual record, the Field Calculator can be used to save time.
In this scenario, it is assumed a domain which has values assigned to it is applied to the field. The domain has the following attributes:
- Domain Name: Color
- Field Type: Long Integer
- Domain Type: Coded Values
- Code: 0 Description: Blue
- Code: 1 Description: Red
- Code: 2 Description: Green
This workflow describes the steps to apply a coded value domain to a field within a feature class using the Field Calculator.
- Open the attribute table of the feature class.
- Highlight the records to apply the coded value domain descriptions to.
- Right-click the field name the domain (Color) is applied to, and click Field Calculator.
- Input the coded value that matches the desired description. For instance, if it is necessary for all values to be 'Red', input '1' and select OK. This is because the coded value assigned to 'Red' in the domain is '1'.
Note: Keep in mind the field type of the field must match the field type of the domain.
- ArcMap: A quick tour of attribute domains
- ArcMap: Creating a new coded value domain
- ArcMap: Editing attributes with subtypes and attribute domains
- FAQ: Is it possible to select multiple coded values in a domain field?