Feature Layer View

726
6
Jump to solution
01-22-2019 10:14 PM
Tolo__AdamTolo
Occasional Contributor

I have created a feature layer view based off a feature service hosted in AGOL.

If I make a simple schema change like adding a new field to the original feature service, is there a way to push those changes to the feature layer view?

Looking for an alternative option instead of deleting the view, create a new one and go through all the settings to re-set the new view up again?

0 Kudos
1 Solution

Accepted Solutions
ChrisWhitmore
Esri Regular Contributor

Hi Adam, you likely need to enable the new field on your feature layer view. If you open the view in the map viewer, you should see an option in the layer menu "Set View Definition" -> "Define Fields":

In the "Define Fields" dialog, you should then see the fields you've added:

If you still don't see the new fields, probably best to contact Technical Support to figure out what is happening. Ultimately as Khaled mentioned, feature layer views do inherit fields added to the primary layer. They are just disabled from the view until explicitly enabled by you. This is to maintain data security - say you add a field with sensitive info to your private primary layer that has public views. If the field were to automatically show, the data would be exposed before you had the opportunity to disable.

note - and as Russ mentioned, if the layer was created using Survey123, field inheritance may be disabled. 

Cheers,

Chris

View solution in original post

6 Replies
KhaledHassen
Esri Contributor

Yes that is supported by default in all views.Schema changes like adding or dropping column in the source data will be propagated to all views. Also changing any field property like domains, alias would also be propagated to the views. 

Khaled

Online feature service Dev. Lead

Tolo__AdamTolo
Occasional Contributor

Thanks for the response Khaled. That is exactly what I thought would occur but for some reason it has not.

Does it matter how you make schema changes? I just did it in the data tab in AGOL.

0 Kudos
RussellRoberts1
Frequent Contributor II

Are the views you are using created with survey123?

0 Kudos
KhaledHassen
Esri Contributor

No it does not matter how you do the schema updates. UX schema updates call the low level REST API and this is where view refresh happens. Is it possible this is an old view you have created like a release or so ago? Can you try it on a new view and let me know?

0 Kudos
ChrisWhitmore
Esri Regular Contributor

Hi Adam, you likely need to enable the new field on your feature layer view. If you open the view in the map viewer, you should see an option in the layer menu "Set View Definition" -> "Define Fields":

In the "Define Fields" dialog, you should then see the fields you've added:

If you still don't see the new fields, probably best to contact Technical Support to figure out what is happening. Ultimately as Khaled mentioned, feature layer views do inherit fields added to the primary layer. They are just disabled from the view until explicitly enabled by you. This is to maintain data security - say you add a field with sensitive info to your private primary layer that has public views. If the field were to automatically show, the data would be exposed before you had the opportunity to disable.

note - and as Russ mentioned, if the layer was created using Survey123, field inheritance may be disabled. 

Cheers,

Chris

View solution in original post

Tolo__AdamTolo
Occasional Contributor

Legend!


This is exactly what I was missing. Makes complete sense when you explain it as data security concerns but I thought this setting would be found in the Data tab of the View.

Thanks for your help.

Cheers,

Adam

0 Kudos