I create a feature layer programmatically by setting the source, add to web map, and all displays fine. I then update some feature attributes in that layer programmatically by using applyEdits. All this seems to be working correctly. When I click on the feature to display the popup, I see the attribute values are all updated. However, if I try to use definitionExpression to filter on the updated attributes, it does not return any results. In debugging and viewing the layer source items, those attributes do not have the updated values.
Note that the code to filter on attributes I am not changing works. (i.e. features matching the query are visible, and those that do not are hidden).
I'd like to be able to filter features in my layer using the updated attribute values after an applyEdits. Is this not possible with the definitionExpression? Any advise on how I could do that?
Thanks.