AnsweredAssumed Answered

Workaround for #BUG-000117831 The export capability is not honored when using the FeatureSharingDraft Python function in ArcGIS Pro and set the allowExporting parameter as True

Question asked by tpcolson Champion on Dec 27, 2019

I've discovered a nifty workaround to #BUG-000117831 The export capability is not honored when using the FeatureSharingDraft Python function in ArcGIS Pro and set the allowExporting parameter as True, which is also the case when using sharing_draft.allowExporting = True

 

from arcgis.gis import GIS
gis=GIS('https://www.arcgis.com', 'user', 'pass!')
search_result= gis.content.search(service, "Feature Layer")
update_item = search_result[0]
from arcgis.features import FeatureLayerCollection
update_flc = FeatureLayerCollection.fromitem(update_item)
update_flc.properties
update_dict = {"capabilities": "Query,Sync,Extract"}
update_flc.manager.update_definition(update_dict)

 

Where "service" is the service name.

 

 

Which, when added to the end of your sharing_draft codeblock will override the AGOL bug which will likely not be fixed for a very long time (bug shows "In Product Plan", so I'm at least hopeful that it's passed the "never going to fix" stage)

Outcomes