Select to view content in your preferred language

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

751
2
Jump to solution
02-02-2024 09:49 AM
Labels (1)
RobBlis
Emerging Contributor

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)
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

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.

RobBlis
Emerging Contributor

Thanks for the clarification.

0 Kudos