Shouldn't the editor widget honor definition expression?

374
2
01-24-2020 01:32 PM
AliWieckowicz
New Contributor III

If a feature layer has a definition expression define, as in the code pen example linked below, shouldn't you only be able to see, 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.

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

https://codepen.io/AliWieck/pen/ExaMWJq?editors=1000 

Line 90ish 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.

0 Kudos
2 Replies
HeatherGonzago
Esri Contributor

Hi Ali, 

You are correct. The definitionExpression should be taken into consideration. There is a bug for this and we're hoping to have it addressed for the next 4.15 release slated for March timeline.

Thanks.

0 Kudos
HeatherGonzago
Esri Contributor

Just a head's up, this has been addressed in our next 4.15 release.