Create and manage subtypes

Using the Subtypes view, you can view existing subtypes and edit their properties and values, delete subtypes, and create new 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 ribbon allows you to perform common clipboard edit operations within the grid: copy, paste, cut, and delete. You can use the Create/Manage button to create new subtypes or manage existing subtypes. From the Design group on the ribbon, you can open either Fields View or Domains View to navigate and manage your data model. Once you've performed a number of edits in the Subtypes view, click the Save button to commit those changes to the database.

Continuing the workflow from the previous help topics in this section, the following example shows the creation of subtypes on the Buildings layer. The BLDGTYPE field was chosen to apply the subtypes to and the Manage Subtypes dialog box has been opened to add appropriate codes and descriptions for the new subtypes. These subtypes will represent different types of buildings, such as Development, Utility, Marketing, and Security. Now when a new building is created, the type of building will be determined by the subtype you choose.

Creating subtypes on the BLDGTYPE field of the Building layer

After assigning a subtype field, filling out the subtype properties with valid values in the Subtypes view, and clicking the Save button on the ribbon, the subtypes can be used in Map view when viewing or editing data. 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. This is shown in the previous screen capture.

Note:
When there are unsaved edits in an active map the Save button will be disabled and an information banner will alert you. To enable the Save button again you will first need to save or discard the edits in the map.

While editing in Subtypes view, you can navigate the grid by clicking in cells, or you can use the Tab or arrow keys to move across rows and up and down columns.

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, switch to Fields view and add an integer field on which to base the subtypes.

Open the Subtypes view

The Subtypes view can be opened from the following locations:

  • Catalog pane—Right-click the feature class or table you want to open the Subtypes view on and choose Design > Subtypes.
  • Contents pane—Right-click a layer or table and choose Design > Subtypes.
  • Ribbon—Select a layer in the Contents pane. On the Feature Layer contextual ribbon, click the Data tab, and click Subtypes in the Design group.

Create a subtype

To create a subtype, complete the following steps:

  1. In the Contents window, select a layer.

    The contextual Feature Layer tabs are now available on the ribbon.

  2. Click the Data tab in the Design section and click the Subtypes ribbon item.
  3. Click the Create/Manage button on the Subtypes view ribbon.

    The Subtypes manager window appears.

  4. Select a field to be the subtype field from the Subtype field drop-down list.
  5. In the Code column, enter a code value.

    This code value may already exist in the data, or you can add a new code value.

  6. In the Description column, enter a description for the corresponding code value.
  7. When you finish adding codes and descriptions, click OK to close the Subtypes manager window.

    The new values are added to the Subtypes view grid.

  8. Click the Save button on the Subtypes ribbon to add the new subtypes to the field.

The Subtypes manager window has a Discover codes button to help with adding new subtypes. When the button is clicked, a search is performed on the data and any code values that exist in the field that are not yet defined in the subtypes table will be added to the subtypes table.

Delete a subtype

A subtype can be deleted in the Subtypes manager window. See the previous task for steps to access the Subtypes manager window.

  1. In the Subtypes manager window, select the row representing the subtype code and description that you want to delete.
  2. Press the Delete key.
  3. When you are finished, click OK to close the Subtypes manager and click the Save button on the Subtypes ribbon to remove the subtype from the field.

Multiple subtypes can be deleted at once by selecting more than one row using the Ctrl or Shift key.

Modify subtypes

The Subtypes view can also be used to set the default subtype for the field, set a domain or default value for specific fields in a subtype, or reorder the subtypes.

To set the default subtype for the field, open the Subtypes manager window, select a subtype from the Default subtype drop-down list, and click OK. To clear the subtype field for the layer or table, choose Clear all subtype values from the Subtype field in the Subtypes manager window. This removes all subtype values.

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. If you want to create a new 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. If you want to clear the domain from a field, select the empty row from the drop-down list.

Continuing the workflow from the previous topic, the following screen capture shows the assignment of a domain and default value to the Development subtype for the BLDGTYPE 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 enter a value that is appropriate for the data type of the field.

Assigning the default value of Employees for the ACCESSTYPE field of the Buildings layer for the Development subtype

Using the Subtypes manager window, you can also sort or reorder your subtype values by clicking the Code column header. An arrow appears when you click the header indicating whether the code is sorted by ascending or descending order. The description column also has the capability to sort by ascending or descending alphabetical order. If you want to reorder the subtypes, you can select a row and drag it into the desired place. The final order of the rows is reflected in the order of the columns in the Subtypes view.