Select to view content in your preferred language

Newly Added Field Not Available in View Layer

616
4
Jump to solution
01-25-2021 08:40 AM
Labels (1)
jcarlson
MVP Esteemed Contributor

I've already figured this one out, but I'm posting my issue and the solution for the benefit of others. Here's the situation:

  1. I have a hosted layer A with fields [1, 2, 3] with a dependent view layer B showing all the same fields.
  2. From Pro, I overwrite layer A, including the new field 4 when doing so.
  3. On layer A, I configure the new field 4 to be visible, have certain domains, etc.
  4. On layer B, when I attempt to update the View Definition, field 4 does not appear in the list of available fields.

I attempted to use the arcgis.features.managers.FeatureLayerManager.add_to_definition() function to an identical JSON dict to the parent layer A, only to get the response that the operation was not supported on view layers.

How then, can I add an new, existing field from A to B?

- Josh Carlson
Kendall County GIS
0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

The short answer: I can't!

Or I should say, not directly. From what I can tell, view layer B only gets the message that a new field has been added when the add happens in AGOL / Portal.

If I manually add a field 5 to the parent layer A, some background refresh must occur, because then both new fields, 4 and 5, appear on view layer B. Then I can just go and delete field 5 and work with field 4 in the view.

In summary: if you are overwriting a hosted layer, add your new fields first.

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
4 Replies
jcarlson
MVP Esteemed Contributor

The short answer: I can't!

Or I should say, not directly. From what I can tell, view layer B only gets the message that a new field has been added when the add happens in AGOL / Portal.

If I manually add a field 5 to the parent layer A, some background refresh must occur, because then both new fields, 4 and 5, appear on view layer B. Then I can just go and delete field 5 and work with field 4 in the view.

In summary: if you are overwriting a hosted layer, add your new fields first.

- Josh Carlson
Kendall County GIS
0 Kudos
m3
by
Occasional Contributor II

I added a new field in layer A in AGOL and nothing is showing in layer (or C for that matter).  I can just make another view, but I'm wondering if you actually had it work in the past?

Layer B happens to be a _stakeholder layer for a survey, not sure I can just delete that one. 

0 Kudos
m3
by
Occasional Contributor II

Solving my own issue too:

Go to Settings tab > Update View > Select layer > Next > Click on layer > Click Fields > Click Select Fields Button > Select your field > Done > Back arrow > Update

Number1point0
New Contributor II

^ This should be marked as the solution. I had no idea this was tucked away under settings. Thank you!

0 Kudos