<?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 Attribute only editing in Python Publish Web Layer Script in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/attribute-only-editing-in-python-publish-web-layer/m-p/1103526#M42379</link>
    <description>&lt;P&gt;All, thank you in advance for help on this. Need just a little bit of help changing a parameter. Thank you, thank you!&lt;/P&gt;&lt;P&gt;I have been using this script to upload web layers in model builder (so I can automate and run nightly):&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/publish-and-overwrite-web-layers-in-modelbuilder/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/publish-and-overwrite-web-layers-in-modelbuilder/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I need to modify this script so that the enableEditing parameter allows users to ONLY update attributes. By deleting "Create, Delete" from the below line, I can disable creating new features and deleting existing:&lt;/P&gt;&lt;P&gt;capabilities += ",Create,Delete,Update,Editing"&lt;/P&gt;&lt;P&gt;BUT, that still allows the users to modify geometry AND attributes. I need to make it so that users in the field can only update an attribute (so we don't have accidental geometry changes).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help me Obi Wan! You're my only hope&lt;/P&gt;</description>
    <pubDate>Thu, 30 Sep 2021 15:02:06 GMT</pubDate>
    <dc:creator>KBKnight</dc:creator>
    <dc:date>2021-09-30T15:02:06Z</dc:date>
    <item>
      <title>Attribute only editing in Python Publish Web Layer Script</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/attribute-only-editing-in-python-publish-web-layer/m-p/1103526#M42379</link>
      <description>&lt;P&gt;All, thank you in advance for help on this. Need just a little bit of help changing a parameter. Thank you, thank you!&lt;/P&gt;&lt;P&gt;I have been using this script to upload web layers in model builder (so I can automate and run nightly):&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/publish-and-overwrite-web-layers-in-modelbuilder/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/publish-and-overwrite-web-layers-in-modelbuilder/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I need to modify this script so that the enableEditing parameter allows users to ONLY update attributes. By deleting "Create, Delete" from the below line, I can disable creating new features and deleting existing:&lt;/P&gt;&lt;P&gt;capabilities += ",Create,Delete,Update,Editing"&lt;/P&gt;&lt;P&gt;BUT, that still allows the users to modify geometry AND attributes. I need to make it so that users in the field can only update an attribute (so we don't have accidental geometry changes).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help me Obi Wan! You're my only hope&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 15:02:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/attribute-only-editing-in-python-publish-web-layer/m-p/1103526#M42379</guid>
      <dc:creator>KBKnight</dc:creator>
      <dc:date>2021-09-30T15:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute only editing in Python Publish Web Layer Script</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/attribute-only-editing-in-python-publish-web-layer/m-p/1107413#M42573</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/40788"&gt;@KBKnight&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;To do that, you need to update the&amp;nbsp;allowGeometryUpdates to false in the service draft. You may refer to the snippet below to update.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;doc = DOM.parse(outsddraft)
configProps = doc.getElementsByTagName('ConfigurationProperties')[0]
propArray = configProps.firstChild
propSets = propArray.childNodes
for propSet in propSets:
    keyValues = propSet.childNodes
    for keyValue in keyValues:
        if keyValue.tagName == 'Key':
            if keyValue.firstChild.data == "allowGeometryUpdates":
                keyValue.nextSibling.firstChild.data = "false"          
f = open(sddraft_output_filename, 'w')
doc.writexml(f)
f.close()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tang&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 05:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/attribute-only-editing-in-python-publish-web-layer/m-p/1107413#M42573</guid>
      <dc:creator>SzuNyiapTang</dc:creator>
      <dc:date>2021-10-14T05:59:23Z</dc:date>
    </item>
  </channel>
</rss>

