If a feature layer has a definition expression defined, as in the code pen example, shouldn't you only be able to see and edit (select for editing) features that meet the definition expression?

It seems that the widget tool doesn't honor the definition expression and its quite confusing.

I need a work around.

Example: You have a feature layer in a web map, there are two features in the data source that over lap, the definition expression is true for 1 and false for the other (so you can't see the second in the web map), if you select the edit tool and click on the one that is visible, both are queried from the feature service and both are displayed in the edit widget results.

Is there something I'm not configuring correctly?

Here is a code pen example. Click on the pink zigzag patrol line with the edit tool active


Line 91 of this codepen example applies a definition query that should limit display of any police route lines like so

layer.definitionExpression = "PatrolType = 'Segway patrol'"

yet when I click on a location where I know there are Segway and other types of routes that are overlapping, I get all features returned and displayed in the editor widget even though only one is visible on the map. Click the button for any feature that doesn't meet the definition expression does nothing.

enter image description here

1 Answer 1


Esri confirmed it's a bug. Should be fixed in 4.17 release scheduled for March.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.