We have a WebMap with a FeatureLayer. The FeatureLayer has 2 sublayers. One has areas (polygons) where you can click on, the other layer should be visible after a click on the area. This is accomplished by a filter. If a field in the FeatureLayer.attributes is filled with a value, the polygon is visible in the color defined in ArcGIS online portal. In the Javascript code I return a value in the specific field. That works. The refresh() command does not update the polygon on the screen. The issue is that I have to reload the browser to see the change on the screen. The layer is updated by using the zoom buttons, but I can't find a method to refresh the layer in code, or even better, refresh the polygon. I made a silly hidescreen -> zoom in -> zoom out -> show screen function to have the layer refreshed by controlling the zoom buttons, but I can't imagine there are no other options. Found various similar questions in this community portal, tried all suggestions but there is no success.
Who has a solution?
Appreciated.