Select to view content in your preferred language

Allow users to add attachments but not delete attachments (Update capability should not allow deletes)

990
0
05-18-2023 05:12 PM
Status: Open
ChristopherCounsell
MVP Regular Contributor

Users adding photos to existing point can delete previously collected attachments.

The ArcGIS REST API to add attachments requires the Update or Create ability:

https://developers.arcgis.com/rest/services-reference/enterprise/add-attachment.htm

We want our fieldworkers to maintain existing assets, not create new ones, so we enable Update.

But Delete Attachments is a feature update. It requires the Update capability:

https://developers.arcgis.com/rest/services-reference/enterprise/delete-attachments.htm

This makes zero sense from a data management perspective as we don't want users to delete collected data.

A workaround is to add photos to records in a related table (only 'Creating' records + attachments). But then they become nested, and as the attachments are not directly related to the parent geometry they can't be visualized in the parent table pop-up.

Enterprise equivalent idea:

https://community.esri.com/t5/arcgis-enterprise-ideas/prevent-users-from-deleting-attachments-if-the...