Domains and subtypes

Insights in ArcGIS Online
Insights in ArcGIS Enterprise
Insights desktop

Domains and subtypes are components of feature layers and feature classes that can be used to constrain or define fields in your datasets. ArcGIS Insights supports using datasets and fields that have a domain or subtype defined.

Note:

Domains and subtypes cannot be created or assigned to fields in Insights. You can create and assign domains and subtypes to your datasets in other ArcGIS products, such as ArcGIS Pro, ArcGIS Online, and ArcGIS Enterprise. The data can then be used in Insights.

Domains

Domains are used to describe the values accepted in a field. Only values or ranges of values that have been deemed valid can be used as input in a field where a domain is applied. Therefore, domains are an important resource for maintaining data integrity, especially when data is being collected in the field by many workers.

There are two types of domains that can be assigned to a field: coded value domains and range domains.

Coded value domains

Coded value domains specify a valid set of values that can be used in the field. A coded value domain consists of codes that will be saved in the dataset and user-friendly descriptions that correspond to each code, similar to a reference table. For example, an electrical utility provides a map of outages. To maintain consistent information and style on the map, the Status field has a domain applied with the accepted status values. The following table is an example of the codes and descriptions that could be applied to the Status field:

CodeDescription

A

Out of service

B

Dispatched

C

Planned outage

Range domains

Range domains are available for numbers and dates and specify the minimum and maximum values accepted in the field. Data entries outside the range will not be accepted in the field. For example, a public works department must do annual inspections for all the fire hydrants in the city. The normal pressure range for the hydrants is between 50 and 120 psi. A range domain can be created with a minimum value of 50 and a maximum value of 120. The domain can then be applied to the Pressure field so only values within that range can be entered. Any hydrants that do not have pressure values in that range will fail the inspection.

Subtypes

Subtypes are a set of features that share the same attributes. Each subtype is defined to provide other fields with the correct attribute information, including domains and default values. Subtypes are most useful in situations in which the attributes in your data are linked to other attributes. For example, street subtypes could include residential, arterial, and highway. Each of these subtypes could also have an associated default speed limit.

Case study

A database table with city-owned water pipes has a Type field that accepts two subtypes: main and service pipe. Each subtype defines a set of rules for the Materials field and the Diameter (in.) field. The Status field has a separate domain that is not linked to either subtype.

TypeMaterialsDiameter (in.)Status

Subtype 1: Main

Coded value domain 1

  • Code: PVC
  • Description: PVC (Polyvinyl chloride)

  • Code: I
  • Description: Ductile Iron

  • Code: S
  • Description: Steel

Range domain 1

  • Minimum: 29.5
  • Maximum: 90.5

Default value: 29.5

Coded value domain 3

  • Code: IS
  • Description: In service
  • Code: L
  • Description: Leaking
  • Code: IR
  • Description: In repair
  • Code: IC
  • Description: In construction
  • Code: NU
  • Description: Not in use

Subtype 2: Service pipe

Coded value domain 2

  • Code: PEX
  • Description: PEX (Cross-linked polyethylene)
  • Code: PERT
  • Description: PE-RT (Polyethylene of Raised Temperature)
  • Code: PVC
  • Description: PVC (Polyvinyl chloride)

Range domain 2

  • Minimum: 0.75
  • Maximum: 1

Default value: 1

A new subdivision in the city requires new water mains and service pipes, and a GIS analyst in the public works department is tasked with adding the new features to the dataset.

The first feature added is the new water main, using the Main subtype in the Type field. The Main subtype is connected to a coded value domain in the Materials field and a range domain in the Diameter (in.) field. The new water main is made of steel with a diameter of 50 inches, so the analyst updates the Materials field to Steel and changes the Diameter (in.) field to 50 from the default value of 29.5.

Tip:

While the database stores the data using the code from the coded value domain, the analyst only sees the description.

The final field, Status, is also a coded value domain. However, this domain was applied to the field, not to the subtype. Therefore, the same options are available regardless of which subtype is chosen for the Type field. The analyst updates the Status field to In construction, since the work on the water main is not yet completed.

The next feature the analyst adds to the dataset is a new service pipe connecting one of the newly built houses to the water main. The new feature uses the Service pipe subtype in the Type field. The service pipes are made from 1-inch PEX pipe, so the analyst updates the Materials field to PEX (Cross-linked polyethylene) and keeps the Diameter (in.) field set to the default value of 1. Since the service pipe has already been installed but is not yet providing water to the new house, the Status field is updated to Not in use.

Once the water for the subdivision is turned on, the Status field for all new water mains and service pipes will be updated to In service.

Supported data types

Feature layers and tables from supported enterprise geodatabase tables that have domains and subtypes defined can be used in ArcGIS Insights. Since domains and subtypes cannot be created in Insights, you will have to create and apply the domains and subtypes in a different software, such as ArcGIS Pro, before the data is used in Insights.

Feature layers

Domains can be created and applied to a field in a feature class in ArcGIS Pro and published to your organization as a hosted feature layer. Attribute lists and ranges can also be created directly within your ArcGIS Online or ArcGIS Enterprise organization.

Subtypes can be created and applied to a field in a feature class in ArcGIS Pro and published to your organization as a hosted feature layer. Subtypes cannot be defined directly within your ArcGIS Online or ArcGIS Enterprise organization.

Enterprise geodatabase tables

Domains and subtypes can be created and applied to fields in tables in supported enterprise geodatabase versions. You can then create a connection to the database to use the data in Insights in ArcGIS Enterprise or Insights desktop.

Limitations

Insights does not support using fields with domains or subtypes for the following capabilities:

Multidomain fields (in other words, fields with different domains based on the subtype) are not supported for the following capabilities:

Domains and subtypes are not supported for remote feature layers. If a remote layer contains domains or subtypes, you can copy the layer to your workbook to use the domain and subtype fields.

*Coded value domains use the codes stored in the dataset rather than descriptions to create a relationship. Therefore, the second dataset used in the relationship should have a field matching the field type and values of the codes, rather than the descriptions.

Resources

Use the following resources to learn more about attribute domains: