How do you delete Survey123 attachments?

2654
5
05-31-2017 06:01 AM
HélèneTouyéras
Occasional Contributor II

Hello,

I am testing out Survey123 before we release it to field users. They are particularly interested in the attachments, notably to provide survey location pictures.

The location of attachments is obscure, and there seems to be no documentation on how to delete attachments. Is deleting the complete feature layer record required/necessary? Can it be retained, but the attachment deleted? ... could these points be added to Survey123 online help?

Many thanks!!

Hélène.

0 Kudos
5 Replies
CarmelConnolly
Esri Regular Contributor

Hi Hélène, 

Handling attachments can be done through the REST endpoint of the Survey123 feature service:

View: ArcGIS REST API  

Delete: ArcGIS REST API 

If your feature service URL is http://services.arcgis.com/o2LSl4aYwDzAIuw9/arcgis/rest/services/Example/FeatureServer/0 then add the feature ObjectID and attachments on to the end of the URL to see the attachments, for example http://services.arcgis.com/o2LSl4aYwDzAIuw9/arcgis/rest/services/Example/FeatureServer/0/5/attachmen... 

To delete attachments, add deleteattachments to the end of the URL: http://services.arcgis.com/o2LSl4aYwDzAIuw9/ArcGIS/rest/services/example/FeatureServer/0/2/deleteatt...

http://services.arcgis.com/o2LSl4aYwDzAIuw9/ArcGIS/rest/services/service_411ccaec10f04f9b860d3f13d00...

So you can delete an attachment and it's associated record/row will remain.

Carmel

HélèneTouyéras
Occasional Contributor II

Thanks Carmel, I managed it. The URL where you add the deleteattachment method has to bear the ID of the attachment, though, not the ID of the feature.

Is a GUI planned to allow Survey123 users, that may not be IT-literrate enough, to manage their attachments?

CarmelConnolly
Esri Regular Contributor

Hi Hélène, 

I'm not aware, James Tedrick‌ might know? Otherwise, it would be a great idea to post here. Including your reasoning for this funcitonality will help the Survey123 guys when they review it

Carmel

HélèneTouyéras
Occasional Contributor II

Will do - thanks again!

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Hélène,

We don't have plans to allow for deletion of attachments in the Survey123 website itself currently.  That being said, this can be done with the Map Viewer in ArcGIS Online or a web map with editing controls (such as a Web AppBuilder app) can be created.  We normally encourage creating an app as it allows you to create a focused solution for editing/QA'ing your survey data.