English

Problem: Changing subtype fields does not populate the expected fields in ArcGIS Online

Description

Subtypes are records in a table or feature class that have been grouped based on an attribute field. Subtypes are implemented by creating coded values and, therefore, must be associated with fields of the data type short or long integer. These integer values each represent a feature in the subtype. For example, the following codes in a subtype named RoadClass could represent valid classes in a feature class for streets:

  • 0 - Local Streets
  • 1 - Secondary Streets
  • 2 - Main Streets

Each subtype can have its own set of default values. In the above example, the local streets subtype could have the default value for a speed limit attribute set to 25 miles per hour, while the default value for the main streets subtype could be 35 miles per hour. Whenever a local street is added to the streets feature class, its speed limit attribute is automatically set to 25 miles per hour. Whenever a main street is added, the speed limit is set to the default of 35 miles per hour.

However, when modifying existing features in ArcGIS Online, editing the subtype field(s), the default values for the edited field do not get applied in the same manner as they do in ArcGIS Desktop. In the web map, when the subtype value is changed from the drop-down, the accompanying field is not automatically updated with the default value; it is instead left blank and requires the editor to select one of the available options.

Cause

This is a known limitation in the JavaScript application programming interface (API). When editing the features in the ArcGIS Online web map, a JavaScript API, the default domain(s) associated with the subtype(s) only appear when creating a new feature.

Solution or Workaround

There are three options that can be used as an alternative to this behavior:

  • Option 1: The first option is to use the existing feature templates to create new features based on the default, pre-configured feature templates. If the feature templates were created prior to the publishing process, the attribute values should have been created with the default domain and subtype values that are set when adding new features based on that specific feature template.
    Note:
    Feature templates define all the information required to create a feature: the layer where a feature is stored, the attributes a feature is created with, and the default tool used to create that feature. 
    
    A layer can have multiple templates associated with it, where each template has different default settings. For example, if there is a roads layer with classifications of freeway, major highway, and local road, there could be three different templates, with each one having a different default attribute for the type of road. This makes it easier to create the new type of road needed from the start.

    If feature templates were not established before the publishing process, they can be generated from the original feature class and the service can be republished and overwritten, or a local copy of the service can be created, the feature templates added, and the service republished and overwritten.

    Once the feature templates are available, new features can be created with the appropriate templates, old features can be deleted, and attribute values can be adjusted as needed.
     
  • Option 2: The second option is to configure and assign domains to each individual field and republish the service. Follow the steps below to create domains and assign them to the individual fields in ArcMap before publishing to ArcGIS Online.
    1. In the Catalog tree, right-click the table or feature class with which to associate domains.
    2. Click Properties.
    3. Click the Fields tab.
    4. Click the field to associate with the domain.
    5. Click the field next to Domain, click the drop-down arrow, and click the domain to associate with the field. (Only those domains that apply to this field type are displayed in the list.)
    6. Click Apply and OK.
    7. Publish the feature class to ArcGIS Online again. The drop-down list for domains are now available when editing the attributes in the feature's pop-up window.
  • Option 3: The third option is to edit domains and subtypes in the Data tab of the item details page.
    1. In ArcGIS Online, go to My Content, and select the intended feature layer with domains and subtypes.
    2. Click the arrow beside the feature layer name, and select View item details from the drop-down list.
    3. In the item details page of the feature layer, click the Data tab.
    4. Double-click a value of the domains or subtypes in the table to edit it.

      Editing subtypes in ArcGIS Online

Related Information