Select to view content in your preferred language

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

1905
5
05-18-2023 05:12 PM
Status: Open
ChristopherCounsell
MVP Frequent 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...

 

5 Comments
TD1
by

Agreed. This is still a problem. @ChristopherCounsell  did you find a solution?

g_maps
by

After creating the related table to store new records solely with attachments, I wonder if you would be able to bring those attachments into the parent pop-up using an arcade expression?

ChristopherCounsell
I don't want to duplicate my photos or maintain two tables. I want users to
be able to update features without deleting attachments.

For example, a Task feature is created as a point. Is has attachments for
the job. Users need to update the Task status.

We can't expose the ability to update the status field without allowing the
user to also be able to delete attachments. So the staff could accidentally
or intentionally delete the attachments created on the job. There's no
recovery on ArcGIS Online.

It's not secure and non intuitive.
TD1
by

@ChristopherCounsell yes 100% agreed. It's mind boggling how you can't get granular enough to restrict users from deleting things. Just need an option to leave attachments out of it.

Don't get me started about the no recovery in AGOL...

TD1
by

has this been fixed? ESRI what is the status?