Hi!
We are currently hosting features in ArcGIS Online to be used with the Collector App. We plan to update these features nightly from an SDE environment with Python. Due to some of the network security implementations, we are restricted from using the REST endpoints from an ArcServer instance to create these feature layers. I have written a script to do this, but the issue I am running into is when a user downloads an area for offline use a replica is created. This replica stops the feature's underlying data source (Service Definition File) from updating the feature. A work around I have found is to unregister the replicas then update the feature, but this causes sync errors on the user's collector area when they attempt to re-sync their downloaded area. Does anyone know of a cleaner solution to updating features with outstanding replicas?
Thanks for your help!
Chris
Chris, did you ever find a solution to this?
I'm hitting the same issue with our Open Data layers which are scripted to be updated (via an overwrite) weekly. Sync was enabled on them to allow for use in Collector/Explorer. When users take a map offline this then creates the replicas.
Aside from having two feature layers, one solely for Open Data and another for mobile users I can't see many other options. Even then the feature layers for mobile users would have to be managed via comms with users to try and get as many as possible to remove their offline maps before doing an update. The update would have to remove any outstanding replicas. I've contacted Esri support but thus far they've got no solution.
At minimum I've suggested they at least catch it as an error rather than throwing “Job failed” when carrying out a publish with the ArcGIS API for Python and an even less useful "ERROR 999999: Something unexpected caused the tool to fail…" message when using ArcPy.
Also coming here to see if there was ever a solution? I heard in a webinar that you could create views for sharing/offline use, and then update the root layer that the view(s) stem from, but I've been trying that today and I can't overwrite the layer if there are maps downloaded in Field Maps. Frustrating, I would love to be able to keep our reference data more up to date without having to disrupt folks' field workflows. Is there an easier way? I've tried editing the layers directly but there are too many features for me to do this efficiently.
The work around I went with isn't great, but works for us. If there are replicas, I loop through and unregister them. This means the user will get errors when they sync, so they have to delete their offline copy and download a new one. The edits seem to come over though. Using the predefined areas helps to alleviate some of the issues.