<?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: Can the container property for a FeatureLayer move a FeatureLayer to another Hosted Feature Service? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-container-property-for-a-featurelayer-move/m-p/1493041#M10194</link>
    <description>&lt;P&gt;A nice idea, but alas I believe the intended usage of this is something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
gis = GIS("https://www.arcgis.com", "user", "passwd")

feature_layer_id = "123456789abcdefghijk" # here feature layer in the portal Item sense, not API object sense
item = gis.content.get(feature_layer_id )
flc = item.layers[0].container # here any layer/table index should return the same FeatureLayerCollection object&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So, just another way to get a FeatureLayerCollection. There &lt;EM&gt;might&lt;/EM&gt; be scenarios where this could be more convenient than using&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayerCollection.fromitem" target="_blank" rel="noopener"&gt;fromitem&amp;nbsp;&lt;/A&gt;(maybe when fiddling with views?), but to me using fromitem or just directly initializing a FeatureLayerCollection is more readable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the get/set - that's just Python. Everything is public so you're allowed to set things you probably wouldn't or shouldn't set &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jun 2024 00:24:41 GMT</pubDate>
    <dc:creator>EarlMedina</dc:creator>
    <dc:date>2024-06-15T00:24:41Z</dc:date>
    <item>
      <title>Can the container property for a FeatureLayer move a FeatureLayer to another Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-container-property-for-a-featurelayer-move/m-p/1492833#M10192</link>
      <description>&lt;P&gt;Take a look at the ArcGIS API for Python reference for the FeatureLayer and the &lt;EM&gt;container&lt;/EM&gt; property &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayer.container" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. An also shown below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Clubdebambos_0-1718385735404.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107089i48CD13DBF7BA737E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Clubdebambos_0-1718385735404.png" alt="Clubdebambos_0-1718385735404.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This states that you can GET or SET the FeatureLayerCollection to which the layer belongs. Since a FeatureLayerCollection represents a Feature Service, according to the documentation I should be able to use this to transfer a FeatureLayer from one Feature Service to another.&lt;/P&gt;
&lt;P&gt;Is this actually possible with the &lt;EM&gt;container&lt;/EM&gt; property or is the documentation to teasing the heck out of me? I have a feeling it is nonsense but really want it to be capable.&lt;/P&gt;
&lt;P&gt;All the best,&lt;/P&gt;
&lt;P&gt;Glen&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 19:03:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-container-property-for-a-featurelayer-move/m-p/1492833#M10192</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2024-06-14T19:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can the container property for a FeatureLayer move a FeatureLayer to another Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-container-property-for-a-featurelayer-move/m-p/1493041#M10194</link>
      <description>&lt;P&gt;A nice idea, but alas I believe the intended usage of this is something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
gis = GIS("https://www.arcgis.com", "user", "passwd")

feature_layer_id = "123456789abcdefghijk" # here feature layer in the portal Item sense, not API object sense
item = gis.content.get(feature_layer_id )
flc = item.layers[0].container # here any layer/table index should return the same FeatureLayerCollection object&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So, just another way to get a FeatureLayerCollection. There &lt;EM&gt;might&lt;/EM&gt; be scenarios where this could be more convenient than using&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayerCollection.fromitem" target="_blank" rel="noopener"&gt;fromitem&amp;nbsp;&lt;/A&gt;(maybe when fiddling with views?), but to me using fromitem or just directly initializing a FeatureLayerCollection is more readable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the get/set - that's just Python. Everything is public so you're allowed to set things you probably wouldn't or shouldn't set &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 00:24:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-container-property-for-a-featurelayer-move/m-p/1493041#M10194</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2024-06-15T00:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can the container property for a FeatureLayer move a FeatureLayer to another Hosted Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-container-property-for-a-featurelayer-move/m-p/1493581#M10200</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86309"&gt;@EarlMedina&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a feeling that was the case. I was hoping for some behind the scenes Esri magic when you set the &lt;EM&gt;container&lt;/EM&gt; property, I got excited but I'm back down to Earth now&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 07:43:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-container-property-for-a-featurelayer-move/m-p/1493581#M10200</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2024-06-17T07:43:06Z</dc:date>
    </item>
  </channel>
</rss>

