Overwrite a hosted feature layer with views in Pro when the parent hosted feature layer is published from a file in ArcGIS Pro

3551
16
01-06-2022 02:21 AM
Status: Needs Clarification
Labels (1)
ZoeBroek
Occasional Contributor

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!

Kind regards,

Zoë

 

16 Comments
Esad
by

@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.

NvF
by

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. 

JonahLay
Status changed to: Needs Clarification

Hi everyone,

Thank you for the feedback on this idea. Publishing a layer from Pro, creating a view from the hosted feature layer in ArcGIS Online, then using Pro to overwrite the web layer is a supported workflow that should work.

Since it appears that there may be an issue with overwriting layers with views, can you elaborate on when this issue occurs? What specific steps are you taking? Providing more information will help us determine what needs to be addressed.

Thank you!

MelAlexander

@JonahLay  I'm having this issue as well.

I have data that I am publishing to our enterprise and sharing with a group of other editors. I then make a view layer with editing disabled and share it with a group of viewers.

When I try to overwrite the published layer (either adding rows or adding fields), I get an error and then both the published layer and the view layer will no longer draw on a map. I can delete the view layer, but the original published layer seems to be broken so badly that I cant even delete it anymore, they have to me sequestered to an archive folder.

I'd be happy to screenshare to expedite a fix for this issue.

JonahLay

@MelAlexander Thank you for your comments. Have you reached out to technical support? They may be able to pinpoint the cause of the issue to assist in determining a solution.

BrittanyBurson

Tossing a comment in that it would be helpful to be able to overwrite while also supporting views.