Feature Layer Views: Updating Parent Feature Layer Schema

05-02-2021 11:51 PM
Esri Contributor
12 32 9,779

The Premise:

When we create a Hosted Feature Layer View (hereafter referred to as a "View Layer") from our Hosted Feature Layer in ArcGIS Online, our View Layer schema is inherited from its parent Feature Layer.

Sometimes project design requires us to make schema changes to our parent Feature Layer and we want to be able to ensure that all dependent View Layers are inheriting the same changes. These might include:

  • Adding or deleting fields
  • Updating coded domain lists
  • Editing field name aliases

ArcGIS Online (and ArcGIS Portal) users may run into unexpected issues where updates are not being reflected in their View layers. And it is important to understand how to manage this behaviour before overhauling the content, deleting the old view layers and creating new ones from scratch.


The Troubleshooting:

There are a few reasons why our View Layers might not be inheriting schema changes made to the parent Feature Layer and a few troubleshooting methods at our disposal to narrow down the cause of the disconnect...

First of all, we want to ensure that we're not trying to do something that is simply not possible in ArcGIS Online. View layers that participate in table Joins performed through Map Viewer will create schema-locks that prevent the parent Feature Layer's schema from being edited. We can read more about this here: Bring your data closer together: Save analysis results from Join Features as Hosted Feature Layer Vi...

  • "feature layers that participate in view layers with joins cannot have their schema altered and are always read-only and cannot be used offline."

Once we've clarified that. Let's work through the solution in the following two scenarios to narrow the issue down...

(Note: The following will cover troubleshooting View Layers that have been configured using the "Create View Layer" button on the Feature Layer's Item Details page.)


Scenario 1: We've added new fields to the parent Feature Layer but cannot see them in the View Layer's attribute table

Solution: Update "Define Fields" for the View Layer

  • For the View Layer item, go to: Item Details > 'Visualisation' tab
  • Click the View Layer's 'More Options' list and go to: Set View Definition > Define Fields
  • Check the boxes next to the newly added fields at the bottom of the list.

Resource: Problem: Hosted feature view does not inherit new field added to hosted feature service

Solution: If we have previously chosen to "Define an Area of Interest" for the View Layer... Delete it.

  • For the View Layer item, go to: Item Details > 'Visualisation' tab
  • Click the View Layer's 'More Options' list and go to: Set View Definition > Define an Area of Interest
  • Click "REMOVE AREA" 

Limitation documented here: Considerations when creating hosted feature layer views



Scenario 2: We've added new domains to the 'List of Values' in a particular field for our parent Feature Layer and cannot see them being inherited by a View Layer

Solution: clicking on the "Reset to source" button to revert the view layer's field update property from "Overridden" to "Inherited".

  • This disconnect may have occurred due to changes being made to specific fields within the View Layer, causing the field properties to change from "Inherited" (from the parent layer) to "Overridden".
  • The simplest way this occurs is if changes are made to field names. This causes a break between the aliases in the parent table and those in the View Layer table.
  • For example:
    By default, changes made to the parent layer are "Inherited" by the view layer. Properties: Inherited

  • However, if a change is made to the field name, the view layer's update property becomes "Overridden" and changes to the parent hosted feature layer are not reflected. Properties: Overridden
  • The connection and inheritance can be re-established by clicking on the "Reset to source" button (pictured above) which will revert any changes made to the field, back to that of the parent Feature Layer. The user should check all other fields to ensure this hasn't happened elsewhere.

Read more about the Settings that influence the "Inherited"/"Overridden" field property on View Layers here: Hosted feature layer view settings (edit, courtesy @Bnewell).

Note: In some cases, users will need to carry out a combination of the solutions outlined above to resolve all inheritance issues they are encountering.


Some key things to remember:

  • To maintain schema inheritance, it's best not to make edits in the 'Data' > 'Fields' tab for your View Layers.
  • Once we have published our Feature Layer and created View Layers from it using a Join, we cannot use ArcGIS Pro to Overwrite the parent Feature Layer, as it is now schema-locked. The View Layer(s) will need to be deleted first.
  • If we have subtypes and domains configured for a feature layer and symbology/filters dependent on this schema; create all templates for your layers in ArcGIS Pro prior to publishing.
  • If we have a View Layer participating in a table Join, and we want to edit the parent Feature Layer's schema, then we will need to delete the View Layer created from the Join operation.


About the Author
Esri Australia Client Success team member