In my last blog post, I recommended that, when possible, data administrators restrict field data entry to domains.
In short, domains behave like drop-down menus (when using Coded Value) that allow users to just select the desired value for a particular field. This helps minimize errors by forcing full value selection versus physical typing of the field attribute.
Domains also promote data consistency by preventing unique spellings of the same word (i.e., Manhole, manhole, MH, etc.).
There are two types of domains:
Creating and/or modifying a domain is not difficult but does require exclusive, administrative access to the database. Assuming access, conduct the following procedures to create a domain:
The Database Properties window appears (Figure 2). On the Domains tab, click on the first open box in the Domain Name column and name the domain. In this example, I have named the domain "OverheadUnderground". The Description column is optional, but may help describe the domain’s purpose.
Specify the field type (i.e., integer, text, etc.) based upon the anticipated assigned field.
Determine whether the domain is a coded value or range. For this example, the domain is a coded value domain.
In the Coded Values section, for each row specify a Code (actually stored in the database for the feature) and a Description (what the user actually sees). The values can be exactly the same for a text field (if desired).
Click the OK button to save and dismiss the Database Properties Window.
Assign the new domain to the desired field(s). Note that the same domain can also be applied to multiple fields in multiple feature classes (assuming they are similar in nature). Right-click the feature class and choose Properties.
In the Feature Class Properties Window (Figure 3), select the Fields Tab and select the desired field to add the domain.
In the Domain drop-down, select the newly created domain and click the OK Button. When doing data entry or modification, the end user can now only select Overhead or Underground for the OHUG field.
From time to time, domains need to be modified. For example, some clients of mine have added the value of “Bridge” to the OHUG domain to reflect when a fiber cable traverses a bridge culvert. To update a domain, conduct the following procedure:
From the Database Properties Window, there is no way to sort the values. So in general, the values will appear to the end user in the order that they are input. There is a hidden gem in the Esri tools that enables the sorting of domains. Conduct the following procedure to add the tool to your tool bar:
In conclusion, have a blast creating and modifying your very own domains! I referenced modifying domains in the Associated Posts below: