FeatureLayer:DefinitionExpression not honored on sync

Discussion created by minerjoe Champion on Mar 22, 2018
Latest reply on Mar 15, 2019 by minerjoe

We have noticed that when a FeatureLayer has a DefinitionExpression assigned and a feature gets synced from the server the display does not honor the DefinitionExpression.


As example.  A FeatureLayer.DefinitionExpression = "STATUS = 'Active'".  When the STATUS value is changed at the server to something other than Active the attribute update does sync across as expected and the STATUS field is changed in the offline database.  However, the feature is still visible even though it no longer meets the DefinitionExpression.  If the application is closed and re-opened the feature is no longer visible as expected.


We have tried moving the map, thinking maybe a redraw would refresh the layer but this does not work either.


Is there a way to reapply the DefinitionExpression.  I was going to try to toggle the expression off then back on but that seems more of a hack then I want to do.