<?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: Determine &amp;quot;enable sync&amp;quot; setting in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/determine-quot-enable-sync-quot-setting/m-p/780068#M1152</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion Aaron.&amp;nbsp; &amp;nbsp;I followed up by reading&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/guide/updating-feature-layer-properties/" title="https://developers.arcgis.com/python/guide/updating-feature-layer-properties/"&gt;Service definitions | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;which has a worked example of displaying and enabling sync for a&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Feature Layer Collection.&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;However, I'm working with a &lt;STRONG&gt;Feature Layer (Hosted).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following the example in the docs I can't get it to work for a Feature Layer (hosted).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if this definitely works with &lt;STRONG&gt;ArcGIS Online&lt;/STRONG&gt;, or is it just &lt;STRONG&gt;Portal&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently found out that tracing item dependencies using the functions&amp;nbsp;&lt;STRONG&gt;item.dependent_upon()&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;item.dependent_to()&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;only&lt;/SPAN&gt; work for Portal, and not GIS Online - and there is nothing in the documentation about that -&amp;nbsp; so I'm not sure if its my bad programming, or its just not possible with Online?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If&amp;nbsp; &lt;STRONG&gt;properties.capabilities&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;should work for a hosted Feature Layer,&amp;nbsp;can you point me to a worked example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Feb 2018 10:39:16 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2018-02-16T10:39:16Z</dc:date>
    <item>
      <title>Determine "enable sync" setting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/determine-quot-enable-sync-quot-setting/m-p/780066#M1150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible using the ArcGIS API for python to determine the &lt;STRONG&gt;Enable sync&lt;/STRONG&gt; &lt;SPAN style="text-decoration: underline;"&gt;status&lt;/SPAN&gt; of a hosted feature layer on ArcGIS online?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. this setting:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;IMG __jive_id="396629" alt="sync setting" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/396629_sync_.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't need to change it at this stage, just determine if it is checked or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In context, I intend to loop though all the layers of a web map looking for&amp;nbsp;any layer that does &lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; have sync enabled,&amp;nbsp; using something like this:&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="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; WebMap

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

map_id &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# the_unique_item_identifier would be here #&lt;/SPAN&gt;
search_result&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;map_id&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;max_items&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; search_result&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="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"map title&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

theWebMap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; WebMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;webmapitem&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
layerCount &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;theWebMap&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"layer count = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layerCount&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; layer &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; theWebMap&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerType&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"title&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# mystery bit - property?&amp;nbsp; custom function?&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"syncStatus&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layer&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;/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;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:48:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/determine-quot-enable-sync-quot-setting/m-p/780066#M1150</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T08:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Determine "enable sync" setting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/determine-quot-enable-sync-quot-setting/m-p/780067#M1151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to access the "capabilities" property of the layer (which has sync, editing, create....) by doing the following. The capabilities property is a comma separated string of values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;layer.properties["capabilities"]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can update the layer properties by doing:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;layer.manager.update_definition({&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; "&lt;SPAN&gt;capabilities&lt;/SPAN&gt;": "Editing, Sync, Update, Create, Delete" // Whatever other properties you need or that were previously there&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 13:56:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/determine-quot-enable-sync-quot-setting/m-p/780067#M1151</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-02-15T13:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Determine "enable sync" setting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/determine-quot-enable-sync-quot-setting/m-p/780068#M1152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion Aaron.&amp;nbsp; &amp;nbsp;I followed up by reading&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/guide/updating-feature-layer-properties/" title="https://developers.arcgis.com/python/guide/updating-feature-layer-properties/"&gt;Service definitions | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;which has a worked example of displaying and enabling sync for a&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Feature Layer Collection.&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;However, I'm working with a &lt;STRONG&gt;Feature Layer (Hosted).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following the example in the docs I can't get it to work for a Feature Layer (hosted).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if this definitely works with &lt;STRONG&gt;ArcGIS Online&lt;/STRONG&gt;, or is it just &lt;STRONG&gt;Portal&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently found out that tracing item dependencies using the functions&amp;nbsp;&lt;STRONG&gt;item.dependent_upon()&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;item.dependent_to()&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;only&lt;/SPAN&gt; work for Portal, and not GIS Online - and there is nothing in the documentation about that -&amp;nbsp; so I'm not sure if its my bad programming, or its just not possible with Online?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If&amp;nbsp; &lt;STRONG&gt;properties.capabilities&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;should work for a hosted Feature Layer,&amp;nbsp;can you point me to a worked example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 10:39:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/determine-quot-enable-sync-quot-setting/m-p/780068#M1152</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-02-16T10:39:16Z</dc:date>
    </item>
  </channel>
</rss>

