When creating a hosted feature layer view the following is stated:
You can overwrite the hosted feature layer from which the view was created to refresh the data only if the following are true:
- The parent hosted feature layer was published from a file in ArcGIS Online, not from ArcGIS Pro or ArcMap.
- The hosted feature layer view was not generated by the Join Features analysis tool.
- You did not define an area of interest on the view.
The first point needs to be looked at. At the moment you can't publish a layer from Pro, make views from the hosted feature layer in ArcGISOnline and then use Pro again to overwrite the hosted feature layer to refresh the data of the parent hosted FL.
When using the overwrite web layer tool in ArcGIS Pro it tries to delete all the related service items. Which it can't because there are views created from the parent layer.
StatusMessage: Server Response: ERROR: code:400, Unable to delete item. This service item has a related Service item, Bad syntax in request.
However you CAN publish from a FGDB (or any other file) in Online or use FME to publish. It really stuns me that you can't use ArcGIS Pro for this.
So please take it into consideration to fix this!
@KaraUtter I hope the same. Found out that append is available through Python or REST API but if several map services with multiple layers need to be updated, the append gets a bit complicated.
So for a workaround, I wrote a script that:
1 - Creates a temporary file geodatabase,
2 - Exports the data from SDE to the temp FGDB
3 - Publishes the map to AGO.
Hope it gives some idea to whoever looks for a solution with scripting.
Agreed, this should be corrected. Also, it took me quite a bit of time to figure out that item #1, as noted by the OP, was the reason why all of my symbology/popups refused to update appropriately. Very frustrating for users, ESRI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.