<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using item_mapping option with clone_items not remapping in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1510550#M10376</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/88704"&gt;@WhitneyWeber&lt;/a&gt;,&amp;nbsp;I've had sporadic results with the clone_items function.&amp;nbsp; If you only have a handful of web maps/apps to clone, I would recommend using these &lt;A href="https://community.esri.com/t5/arcgis-enterprise-documents/migrate-content-for-arcgis-enterprise-arcgis/ta-p/1365455" target="_self"&gt;tools&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2024 11:14:58 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2024-07-26T11:14:58Z</dc:date>
    <item>
      <title>Using item_mapping option with clone_items not remapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1505940#M10350</link>
      <description>&lt;P&gt;I am cloning content and a map from one AGOL Organizational account to another. I have cloned the feature layers and created a dictionary (item_mapping) of the source ids and resulting target ids.&lt;/P&gt;&lt;PRE&gt;{'71a362f0234f4d808afb98c786b77b3a': '071531fcd56d4bdf9ee326f5d216d899', '5132f1f6c4504204913e1de9695cdf8d': '91bd6c7a40ba4893b6f5e617ffc24e6c', '1105af2c21224b599d17827c1094408f': '1d05c4d11aec49cc9354d3314ef9283a', '39cccf853c924df98f56ba9a7c469f2e': '2cd6b672ee104ebbae02170987f84be8', '9a773ab569c44b179d583ad4e3b4763d': 'de2772099fd4402ab2d1a0e9840b90f7', '0fabd31bdd0e4ebabe7095c30b9cf831': 'd8f4246ccfa24e58b3032f7568ddc78e', '1d6520ba22ec4d31a3a17040f4f61024': '6cd9ed4462cc4605bcc23e62ae7cefa6', '16cbef787ce744b79e8f69265baaf2e8': '15e98f93773d437cb698bdd7b4a72e06', 'fefc0c039fdd45f69b80429737a9ca2a': '43d5713996b044989debcbd4d4ecd297', '9eba70367c8840238a3df60126a682aa': '58ee2ca97b034df9b45f951100066087', 'c9a3c3dcb00d49bbabe749c057cc9cef': 'caa80d040fa84fdd840a0ed4291de192', '95b614b1100747b6b01333d575249151': 'dfbf86bc61d645f9bd8f6bcb506c2c5f'}&lt;/PRE&gt;&lt;P&gt;Cloning using the item_mapping option was unsuccessful (still referenced source layers). So, it occurred to me that all the cloned layers are not in the map and hence created a second dictionary (webmap_item_mapping), in case this was the problem. This dictionary includes just the list of source and target ids for the layers in the map.&lt;/P&gt;&lt;PRE&gt;{'c9a3c3dcb00d49bbabe749c057cc9cef': 'caa80d040fa84fdd840a0ed4291de192', '0fabd31bdd0e4ebabe7095c30b9cf831': 'd8f4246ccfa24e58b3032f7568ddc78e', '5132f1f6c4504204913e1de9695cdf8d': '91bd6c7a40ba4893b6f5e617ffc24e6c', 'fefc0c039fdd45f69b80429737a9ca2a': '43d5713996b044989debcbd4d4ecd297', '39cccf853c924df98f56ba9a7c469f2e': '2cd6b672ee104ebbae02170987f84be8', '16cbef787ce744b79e8f69265baaf2e8': '15e98f93773d437cb698bdd7b4a72e06', '1105af2c21224b599d17827c1094408f': '1d05c4d11aec49cc9354d3314ef9283a'}&lt;/PRE&gt;&lt;P&gt;Cloning with the second dictionary also fails to remap the layers to the target layers. The map still points to the source layers.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;target.content.clone_items(items=[source_content], folder="Testing", copy_data=False, search_existing_items=True, item_mapping = webmap_item_mapping)&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;I have looked at &lt;A title="clone_items() Behavior has changed" href="https://community.esri.com/t5/arcgis-api-for-python-questions/clone-items-behavior-has-changed/td-p/1272338" target="_blank" rel="noopener"&gt;this post&lt;/A&gt; which suggests that it may be due to the version of ArcGIS API for Python, but the results are the same whether using Pro (version&amp;nbsp;'2.2.0.1') or AGOL.&lt;/P&gt;&lt;P&gt;Any insight into what I'm doing wrong would be much appreciated. I know this is supposed to work and I must be doing something simple wrong as it does according to &lt;A href="https://developers.arcgis.com/python/guide/cloning-complex-apps/" target="_blank" rel="noopener"&gt;the documentation&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 20:16:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1505940#M10350</guid>
      <dc:creator>WhitneyWeber</dc:creator>
      <dc:date>2024-07-16T20:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using item_mapping option with clone_items not remapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1510550#M10376</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/88704"&gt;@WhitneyWeber&lt;/a&gt;,&amp;nbsp;I've had sporadic results with the clone_items function.&amp;nbsp; If you only have a handful of web maps/apps to clone, I would recommend using these &lt;A href="https://community.esri.com/t5/arcgis-enterprise-documents/migrate-content-for-arcgis-enterprise-arcgis/ta-p/1365455" target="_self"&gt;tools&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 11:14:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1510550#M10376</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-07-26T11:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using item_mapping option with clone_items not remapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1522525#M10434</link>
      <description>&lt;P&gt;Anybody have luck on this?&amp;nbsp; The remapping is not working with the API 2.3&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 20:04:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1522525#M10434</guid>
      <dc:creator>JohnLucotch2</dc:creator>
      <dc:date>2024-08-15T20:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using item_mapping option with clone_items not remapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1542416#M10698</link>
      <description>&lt;P&gt;For me item_mapping is not working as it should either.&lt;BR /&gt;I insert a correct dictionary but I always get the following warning :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Item&amp;nbsp;"f4f0b3613cee4ccd9e292fd7b066c27d"&amp;nbsp;does&amp;nbsp;not&amp;nbsp;exist&amp;nbsp;in&amp;nbsp;the&amp;nbsp;source&amp;nbsp;portal&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, this error is not correct, as I have verified that the item exists.&amp;nbsp;&lt;BR /&gt;Is this a bug in the API?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 12:06:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1542416#M10698</guid>
      <dc:creator>Martin1</dc:creator>
      <dc:date>2024-09-25T12:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using item_mapping option with clone_items not remapping</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1654751#M11694</link>
      <description>&lt;P&gt;I'm also having issues with the item_mapping parameter, using API version 2.5. I'm trying to use item_mapping to map between tile layers, since those can't be cloned. But adding this mapping causes errors even when cloning items that are not dependent on any other items, like feature layers, and the IDs referenced in the error messages are not in the mapping. Remove the mapping and they clone over just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm just going to accept that this feature is broken and maybe try to use remap_data to link to the new tile layers.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 08:49:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-item-mapping-option-with-clone-items-not/m-p/1654751#M11694</guid>
      <dc:creator>IsakL</dc:creator>
      <dc:date>2025-10-02T08:49:59Z</dc:date>
    </item>
  </channel>
</rss>

