Select to view content in your preferred language

clone_items() Behavior has changed

5463
10
Jump to solution
03-28-2023 02:18 AM
JoeNunn
Frequent Contributor

Hi, I have previously succeeded in running a python script (set up as a tool in ArcGIS pro) that cloned an app (in this case the attachment viewer) and all  it content which was a map and the layers within the map. It previously functioned perfectly, however a change (earlier this year) has occurred where all the items are cloned (inc a new set of layers), however the layers in the map are still pointing back to the original layers.  A diagram below explains:

Current template:   Orig App >Orig Map >Orig Layers

What should happen after cloning: New App  > New Map > New Layers

What happens after cloning: New App  > New Map > Orig Layers

The line of script looks like this:

appToClone = gis.content.get('xxxxxxxxxxxxxxxxxxxxx')
layerList = [appToClone]
clonedLyrs = gis.content.clone_items(layerList, folder=folderName, copy_data=False, search_existing_items=False)

Any ideas why this is occurring?

Many thanks

Joe

0 Kudos
10 Replies
kapalczynski
Frequent Contributor

I dont understand... How are you publishing Feature Layers, Web Maps and Experience from AGOL to Portal? 

If I use the clone I get all 3 to go over and the feature layer seems to be ok but the web map is referencing AGOL rather than portal.  

0 Kudos