<?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: How to update layer properties in FeatureLayerCollection? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881072#M5108</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't look like it.&amp;nbsp; If you go here&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.admin.html#arcgis.gis.admin.AGOLAdminManager" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.admin.html#arcgis.gis.admin.AGOLAdminManager"&gt;arcgis.gis.admin module — arcgis 1.7.0 documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you'll see that the AGOLAdminManager has no 'servers' module.&amp;nbsp; The best&amp;nbsp; you'll be able to do is change the title of the item.&amp;nbsp; I'm constantly running into little constraints like this.&amp;nbsp; For example, I want to set the content_status property of my layers to 'org_authoritative', or 'public_authoritative' for AGOL.&amp;nbsp; So even though contentStatus is a property of an item because I can see it in the items' json, it is ignored in the item_properties dictionary because the api doesn't seem to provide 'content_status' as value pair.&amp;nbsp; Super frustrating.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Dec 2019 16:20:56 GMT</pubDate>
    <dc:creator>DavidColey</dc:creator>
    <dc:date>2019-12-12T16:20:56Z</dc:date>
    <item>
      <title>How to update layer properties in FeatureLayerCollection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881069#M5105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I know you can update the properties of a FeatureLayerCollection by using a dictionary...My question is: how can you update the layer properties? The layers are a list in the properties dictionary, and I can't figure out how to update the name of a layer, for example...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="string token"&gt;"layers"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"id"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"gggg"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"parentLayerId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"defaultVisibility"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"subLayerIds"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; null&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"minScale"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"maxScale"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"geometryType"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"esriGeometryPoint"&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm using a dictionary to try and update, but can't figure out the proper syntax to access the layer name and update it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;update_dict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="string token"&gt;"serviceDescription"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'newname'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
  &lt;SPAN class="string token"&gt;"layers"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; 
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="string token"&gt;"name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'newname'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:07:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881069#M5105</guid>
      <dc:creator>TraceStanford1</dc:creator>
      <dc:date>2021-12-12T11:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to update layer properties in FeatureLayerCollection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881070#M5106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Trace - I'm assuming you are in ArcEnterprise? Anyway, you can update the title of an Item using the update method in the Item class, but to update the layer name you have to do a service rename using the Service class in the server module. It basically creates a new service with the same id as the old service.&amp;nbsp; It's kind of a pain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 22:37:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881070#M5106</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2019-12-10T22:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to update layer properties in FeatureLayerCollection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881071#M5107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to change the name of a hosted feature layer published to AGOL, so it's not on our server. Can you connect to AGOL with the server module? I thought it was for connecting to a server that had ArcGIS Server or Portal...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2019 18:51:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881071#M5107</guid>
      <dc:creator>TraceStanford1</dc:creator>
      <dc:date>2019-12-11T18:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to update layer properties in FeatureLayerCollection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881072#M5108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't look like it.&amp;nbsp; If you go here&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.admin.html#arcgis.gis.admin.AGOLAdminManager" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.admin.html#arcgis.gis.admin.AGOLAdminManager"&gt;arcgis.gis.admin module — arcgis 1.7.0 documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you'll see that the AGOLAdminManager has no 'servers' module.&amp;nbsp; The best&amp;nbsp; you'll be able to do is change the title of the item.&amp;nbsp; I'm constantly running into little constraints like this.&amp;nbsp; For example, I want to set the content_status property of my layers to 'org_authoritative', or 'public_authoritative' for AGOL.&amp;nbsp; So even though contentStatus is a property of an item because I can see it in the items' json, it is ignored in the item_properties dictionary because the api doesn't seem to provide 'content_status' as value pair.&amp;nbsp; Super frustrating.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 16:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881072#M5108</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2019-12-12T16:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to update layer properties in FeatureLayerCollection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881073#M5109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is frustrating. I'll figure out another way then. Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 22:13:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881073#M5109</guid>
      <dc:creator>TraceStanford1</dc:creator>
      <dc:date>2019-12-12T22:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to update layer properties in FeatureLayerCollection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881074#M5110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Trace,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://ago-assistant.esri.com/" title="https://ago-assistant.esri.com/"&gt;ArcGIS Online Assistant&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is your friend.&amp;nbsp; You can edit the metadata for most of the layers that you own.&lt;/P&gt;&lt;P&gt;AGO Assistant is one of the most useful tools that i have encountered for AGO or Portal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 23:10:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-layer-properties-in/m-p/881074#M5110</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-12-12T23:10:10Z</dc:date>
    </item>
  </channel>
</rss>

