I am trying to manually refresh my featureTable when a user applyEdits to get updated attributes from the backend on the feature I was editing and see if anyone else was editing other features in my extent. Panning or zooming does this, but I want to manually call it. I am using FeatureRequestModeOnInteractionCache. populateFromService seems to work but only when FeatureRequestMode is FeatureRequestModeManualCache. clearCache does half the job, but the featureTable doesn't refresh without user interaction. loadOrRefreshFeatures lets me refresh the feature I updated for the attributes from the backend, but does't get other user changes in my extent.
Let me know if I am missing something.
Thank You
Hi Mark-
As you mentioned, populateFromService is intended for use with manual cache mode only. If you want a specialized feature request workflow, then I suggest manual cache mode. If the on interaction cache mode works except for this one scenario, there are a couple workarounds to try:
- set the refresh interval on the feature layer. This will update at a given interval but not after an event such as an edit.
- manually setViewpoint on the MapView after an edit was completed. Something that just slightly changes the MapViews extent should be enough to trigger a request. As a test, I opened the Add Features sample in Qt Creator and opened the same feature service in the browser. On applyEditsStatusChanged signal, I call `mapView.setViewpointScale(mapView.mapScale - 100);`. I then add a feature in the browser, next add a feature in my Qt app, and the feature added from the browser shows up after.