All, thank you in advance for help on this. Need just a little bit of help changing a parameter. Thank you, thank you!
I have been using this script to upload web layers in model builder (so I can automate and run nightly):
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:
capabilities += ",Create,Delete,Update,Editing"
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).
Help me Obi Wan! You're my only hope
Hi @KevinBracy_Knight ,
To do that, you need to update the allowGeometryUpdates to false in the service draft. You may refer to the snippet below to update.
doc = DOM.parse(outsddraft) configProps = doc.getElementsByTagName('ConfigurationProperties') 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()