Creating subtypes are supported for datasets that contain one or more integer fields. Using the Subtypes view, you can view and edit existing subtype properties, create subtypes, and delete subtypes.
Learn more about subtypes and their properties
The Subtypes view shows all existing subtypes for a layer as well as domains and default values for each field in that layer. The Subtypes tab allows you to perform common clipboard edit operations within the grid: copy, paste, cut, and delete. You can use the Create/Manage button to open the Manage Subtypes dialog box. Here, you can create subtypes or manage existing subtypes. While accessing the Subtypes view, you can access other views to manage properties for the same dataset. You can find these in the Data Design group on the Subtypes tab on the ribbon.
The image below shows the creation of subtypes on the Buildings layer. The Manage Subtypes dialog box has been opened, and the following settings are shown: The BLDGTYPE field was chosen as the subtype field, and appropriate codes and names for the new subtypes are added. These subtypes will represent different types of buildings, such as Development, Utility, Marketing, and Security. When a building is created, the type of building will be determined by the subtype you specify.
Once a field has subtypes assigned to it, it is symbolized in the data grids of the Subtypes and Fields views with bold type and an asterisk. The BLDGTYPE field in the image above illustrates this. While editing in the Subtypes view, you can explore the grid by clicking in cells, or you can use the Tab or arrow keys to move across rows and up and down columns.
When a dataset with subtypes defined is present in an active map view, you can use subtypes for viewing or editing data.
Note:
After a dataset has subtypes defined, set domains and default value properties for fields at the subtype level in the Subtypes view. Modifying domains and default values set using the Fields view at the dataset level will not apply to existing subtypes.Open the Subtypes view
You can open the Subtypes view from the following locations:
- Catalog pane—Right-click the feature class or table you want to open the Subtypes view on and click Data Design > Subtypes.
- Contents pane—Right-click a layer or table and click Data Design > Subtypes.
- Ribbon—Select a layer in the Contents pane, and on the Feature Layer tab set, click the Data tab, and click Subtypes in the Data Design group.
Create subtypes
To create and manage subtypes, complete the following steps:
- Open the Subtypes view.
- On the Subtypes tab, click the Create/Manage button .
The Manage Subtypes dialog box appears.
Note:
You cannot create subtypes if there are no available integer fields to use as the subtype field. If this is the case and you want to create subtypes, open the Fields view and add an integer field on which to base the subtypes.
- From the Subtype field drop-down list, select a field to be the subtype field.
- In the Code column, provide a code value.
This code value can already exist in the data, or you can add a new code value. You can use the Discover codes button to search the subtype field for any code values that exist that are not yet defined in the subtypes table.
- In the Name column, provide a name for the corresponding code value.
- When you finish adding codes and names, click OK to close the Manage Subtypes dialog box.
The new values are added to the Subtypes view grid.
- Review the subtypes, domains applied to each subtype, and the default values, and make any necessary modifications.
Note:
If domains are applied to fields before subtypes are created, the domains are added for each subtype and matching field. - To save all changes made for the dataset, click the Save button on the Subtypes tab.
Delete a subtype
To delete a subtype on the Manage Subtypes dialog box, complete the following steps. See the previous task for steps to access the Manage Subtypes dialog box.
- On the
Manage Subtypes dialog box, select the row representing the subtype code and name that you want to delete.
You can delete multiple subtypes at once by selecting more than one row using the Ctrl or Shift key.
- Press the Delete key or right-click to use the context menu.
- Click OK to close the Manage Subtypes dialog box.
- To save all changes made for the dataset, click the Save button on the Subtypes tab.
Modify subtypes
After you create subtypes for a dataset, you can make additional changes. You can use the Subtypes view to set the default subtype for the field, set a domain or default value for specific fields in a subtype, or reorder the subtypes.
The Subtypes view allows you to apply a domain to a field for each subtype using the drop-down list in the domain column in the subtype. To create a domain for a field, choose Add New Coded Value Domain or Add New Range Domain from the drop-down list depending on the data type of the field. This opens the Domains view, where you can add the new domain. To clear the domain from a field, select the empty row from the drop-down list.
The image below shows the Subtypes view and the assignment of a domain and default value to the Development subtype for the ACCESSTYPE field. If a domain has been assigned to the field, you can select a default value from the drop-down list of valid domain values, or you can provide a value that is appropriate for the data type of the field.
In the Subtypes view, the Manage Subtypes dialog box provides additional access to manage subtypes. Access it using the Create/Manage button on the Subtypes tab.
The following are examples of tasks that you can complete on the Manage Subtypes dialog box:
- To set the default subtype for the field, select a subtype from the Default Subtype drop-down list.
- To add subtypes, provide a code and name in the Subtypes table.
- To delete subtypes, select a single row or multiple rows in the Subtypes table and press the Delete key.
- To remove the subtype field for the layer or table, choose Clear all subtypes from the Subtype Field drop-down list. This removes all subtype values and removes the field from being set as the subtype field.
- To sort and reorder subtypes, click the Code or Name column header. An arrow appears when you click the header indicating whether the column is sorted by ascending or descending order. To reorder the subtypes, select a row and drag it to the new place. The final order of the rows is reflected in the order of the columns in the Subtypes view.