Running clone_items on a webmap does not overwrite an existing clone with changes

335
2
Jump to solution
02-02-2024 09:49 AM
Labels (1)
RobBlis
New Contributor II

Hi Community,

I'm running the clone_item() function to clone a webmap from one Portal to another. 

This works great the first time. 

If I make changes to the source webmap (i.e. Add a layer, change symbology) and then run the clone_items() again for that webmap, the target webmap is not updated.

I do not get any error, I just get empty results.

I understood that the search_existing_items option would reuse the existing item.

Thanks for any help.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
PeterKnoop
MVP Regular Contributor

@RobBlis the documentation is probably not as clear as it could be: 

search_existing_items

Optional boolean. Indicating whether items that have already been cloned should be searched for in the GIS and reused rather than cloned again.

 

"...reused rather than cloned again" means is that if a clone of an item already exists on the target system, then nothing will be done. In other words, it will not overwrite the existing clone. It is not comparing the contents of the item between the source and target, but only whether a cloned item already exists on the target that was generated from the source item.

View solution in original post

0 Kudos
2 Replies
PeterKnoop
MVP Regular Contributor

@RobBlis the documentation is probably not as clear as it could be: 

search_existing_items

Optional boolean. Indicating whether items that have already been cloned should be searched for in the GIS and reused rather than cloned again.

 

"...reused rather than cloned again" means is that if a clone of an item already exists on the target system, then nothing will be done. In other words, it will not overwrite the existing clone. It is not comparing the contents of the item between the source and target, but only whether a cloned item already exists on the target that was generated from the source item.

0 Kudos
RobBlis
New Contributor II

Thanks for the clarification.

0 Kudos