Let's say you have a model in ArcGIS Pro that you run regularly to clean/change some data, after which you share that layer to your Portal/AGOL. To share the result of this layer, you have to either do it manually (right click --> sharing --> overwrite web layer) after running your model, or you can create a Python script to do it and embed the script into your model. However, there is no simple, out-of-the-box "Overwrite Web Layer" tool that you can drag and drop into a model that will do it. This would be very useful for those of us that aren't great with Python and want overwrite a hosted feature layer from within ModelBuilder. arcgis - pro overwrite web layer modelbuilder
See the blog and sample posted here https://community.esri.com/t5/arcgis-pro-ideas/ability-to-overwrite-hosted-feature-layer-within/idc-p/1089800/highlight/true#M16856
It will be a great function!!!
Upvoted. This is invaluable for those using services.
Hi Everyone,
Thanks to all of you who have submitted feedback and information about this idea. We've authored a blog that guides you through creating a script tool that publishes and overwrites web layers in ModelBuilder in Pro 2.8. You can customize the script tool to meet your specific requirements. The article along with a project package containing a sample model and script tools can be found here: https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/publish-and-overwrite-web-layers-in-mod...
Please continue to provide any feedback you may have. This will help our team evaluate the need for other resources in future releases.
Best,
Jonah
Thanks for the resource @JonahLay . I've tried running this a few times today and I keep getting this error: "ERROR 000800: The value is not a member of" and it lists all of the various groups within my organization. Do you have any idea what I might be doing wrong that is throwing this error?
@MattCashen Are you publishing to one of the groups the error lists? I'm assuming you are a member of that group. Did you provide the name of the group exactly as it appears?
@JonahLay When the error kept coming up I wasn't telling the tool to publish to any groups. I seemed to have fixed that by enabling the group parameter to allow multiple values and then creating a value list of my organizations groups. However, now I'm getting the same error for the share organization parameter: "ERROR 000800: The value is not a member of SHARE_ORGANIZATION | NO_SHARE_ORGANIZATION"
I am running some tools prior to this one within the model. I'm joining two layers together and then using the feature class to feature class tool to export that joined layer. I then set that up as a precondition and that all seems to run properly in the model before I get the errors with the web publishing script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.