minerjoe

FeatureLayer:DefinitionExpression not honored on sync

Discussion created by minerjoe on Mar 22, 2018
Latest reply on May 7, 2018 by JNery-esristaff

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. 

 

Thanks

Outcomes