Select to view content in your preferred language

Edit widget breaks for subsequent edits

1198
7
Jump to solution
12-04-2023 02:44 PM
Labels (1)
ChristopherCounsell
MVP Regular Contributor

Hi,

We have a web map with editing enabled and a form designed. Relatively simple, just calculations for username and Now(). 

The web map has been added to an ArcGIS Experience with an edit widget. It allows users to select points and update them. The same layer, form and map as above.

The issue is that the first edit works fine but any further edits on the same or other features, the 'update' button remains inactive. Users need to reload the page or sign in and out.

Editing works fine for:

  • Web Map Viewer and Field Maps
  • The first feature
  • The Experience previewed as draft??
  • Other experiences/maps

Editing does not work in the published experience builder for subsequent feature edits:

  • the admin/owner
  • For a re-created Experience

In the browser developer console we see error messages of GWM_003 token required on load. Undefined typeerrors for attributes.

Given that the edits work OK outside of experience and for the first edit, it's hard to identify this as a configuration issue. Have a technical support case open.

Anyone have any insight or suggestions?

0 Kudos
2 Solutions

Accepted Solutions
AlixVezina
Esri Regular Contributor

@ChristopherCounsell I have read the case and it describes that the web map was created with ONE View layer added several times to the map with MAP filters applied. I have a feeling that this could be related to the issue.

Also not sure how you created your Forms with the calculations (for each copy of the layer separately, or before duplicating the layer?). Not sure if there could be issues with forms as well when the same layer is added to the map.

Maybe try to see if creating separate Layer views for each Filter and adding these layers separately to the map, and setting up the Form for each one individually, might resolve the issue? Also make sure to double-check your share and editing settings in the view layer's item Settings.

I see some weird behavior when editing a layer added multiple times to the same web map, but it does not appear I was able to recreate the case you described with the information at hand. It looks like the support team has assigned more resources to troubleshoot this, so let's see if they can.

View solution in original post

ChristopherCounsell
MVP Regular Contributor

We were able to consistently reproduce the issue by adding the same view layer several times to a map and applying filters on the same field. Editing in experience builder to change values on the field with the filter broke the widget. It looks like the selection state gets out of sync with the features/map/widget and then can't compile the attributes correctly. 

The edit widget 'update' button stayed muted and the browser developer console widget throws an error Uncaught TypeError: Cannot set properties of undefined (setting 'attributes')

Esri support wasn't unable to reproduce it. Knowing the cause/fix for the issue, we chose not to pursue it, but I think it would have been good to look for a dev to look at it more deeply as it seems like the behaviour could manifest issues in other ways. Not a big issue as the workflow is likely a niche one.

For users I would recommend:

  • Don't ever add the same layer more than once to a map. Between this issue and the inability to take the map offline, it's just not a good practice on ArcGIS web maps.
  • Don't use map filters, particularly for editable layers. Use View layer filters to control your data as it's more secure. For web apps, set a filter at the app level for users to adjust with greater transparency.

 

View solution in original post

7 Replies
AlixVezina
Esri Regular Contributor

Hi @ChristopherCounsell do you have the Case or Bug number provided by the technical support team?

ChristopherCounsell
MVP Regular Contributor

Hi @AlixVezina thanks for your reply. It's case 03499745. No bug number as we don't have steps to reproduce.

Only addition to above information is it's a view layer added to a map three times and filtered by a drop-down status field at the map level. 

0 Kudos
ChristopherCounsell
MVP Regular Contributor

@AlixVezina have updated the case but to bring it back to this discussion

it appears that the experience builder can't properly handle dropping the feature selection if the the edit update pushes the feature out of the layer via a map filter. i.e. change status=active to inactive, when map layer filter set to status=active, breaks the experience. 

case has screenshots showing imbalance of selection between the map highlights, map 'selected features' graphics and editing widget selection.

The feature is actively filtered out of a layer but still shows in the edit widget.

subsequent edit attempts then throw attribute/property errors on a feature that doesn't exist in the layer but persisted in the edit wiget.

With Web AppBuilder retiring we need more reliable editing in a standard web mapping application. Have had a really subpar experience with the edit widget and survey123 widget in Experience Builder.

AlixVezina
Esri Regular Contributor

@ChristopherCounsell I have read the case and it describes that the web map was created with ONE View layer added several times to the map with MAP filters applied. I have a feeling that this could be related to the issue.

Also not sure how you created your Forms with the calculations (for each copy of the layer separately, or before duplicating the layer?). Not sure if there could be issues with forms as well when the same layer is added to the map.

Maybe try to see if creating separate Layer views for each Filter and adding these layers separately to the map, and setting up the Form for each one individually, might resolve the issue? Also make sure to double-check your share and editing settings in the view layer's item Settings.

I see some weird behavior when editing a layer added multiple times to the same web map, but it does not appear I was able to recreate the case you described with the information at hand. It looks like the support team has assigned more resources to troubleshoot this, so let's see if they can.

ChristopherCounsell
MVP Regular Contributor

We were able to consistently reproduce the issue by adding the same view layer several times to a map and applying filters on the same field. Editing in experience builder to change values on the field with the filter broke the widget. It looks like the selection state gets out of sync with the features/map/widget and then can't compile the attributes correctly. 

The edit widget 'update' button stayed muted and the browser developer console widget throws an error Uncaught TypeError: Cannot set properties of undefined (setting 'attributes')

Esri support wasn't unable to reproduce it. Knowing the cause/fix for the issue, we chose not to pursue it, but I think it would have been good to look for a dev to look at it more deeply as it seems like the behaviour could manifest issues in other ways. Not a big issue as the workflow is likely a niche one.

For users I would recommend:

  • Don't ever add the same layer more than once to a map. Between this issue and the inability to take the map offline, it's just not a good practice on ArcGIS web maps.
  • Don't use map filters, particularly for editable layers. Use View layer filters to control your data as it's more secure. For web apps, set a filter at the app level for users to adjust with greater transparency.

 

EdwardMcFarlin
Occasional Contributor

@ChristopherCounsell, what do you mean by use "View layer filters"? I have been experiencing this issue as well and can easily reproduce it in an Experience Builder app that is consuming a web map with just a single feature layer. If the layer has a filter on it and is then edited and the edit would cause the feature to be hidden from the map because of the filter, the Edit widget in Experience Builder freezes and the only remedy seems to be to refresh the app in the browser. For example, when editing asset data, we have a filter to only show "active" assets and hide "retired" assets from the map view (which is a very common asset management workflow). If a feature's status is changed from "active" to "retired" with the Edit widget, it is supposed to complete the edit, and the feature should disappear from the map. Instead, the Edit widget just freezes indefinitely (the entire widget panel grays out and large blue circle starts spinning but freezes almost immediately). I even tried to remove the filter from the web map and use the filter widget in Experience Builder, but if the filter is being actively applied with the Filter widget, I have the same experience with the Edit widget freezing up. I started noticing this behavior after our ArcGIS Enterprise portal was upgraded to 11.3 (Experience Builder version 1.14.0). I didn't notice this happening in 11.2 (EB version 1.12.0?). I tried testing this in ArcGIS Online (Experience Builder version 1.16.0) and can't reproduce this issue so hopefully it was fixed and won't do this in AGE 11.4.

0 Kudos
ChristopherCounsell
MVP Regular Contributor
In our case we had Layer A in the map twice. Map filters on A= yes and A=No.

To fix this, we removed the existing layer added twice. We created two
hosted feature layer views and added those to the map. We applied the
yes/no filter on the view later definition.

This won't work for you as you have one layer.

In my experience the active selection context in Experience Builder is
extremely glitchy. We've just put in another defect where selecting list
search results no longer triggers data actions based on selection.

I'd recommend making extremely basic interactions in experience builder
particularly if filtering, selections or data actions are involved. ArcGIS
Dashboards much better otherwise but editing is only recent.

Experience Builder is leagues ahead of web app builder in a lot of aspects
except for reliability and core feature data interactions. Dev is focused
on new additions... Disappointed and frustrated with ESRI on this one.
0 Kudos