Survey123 Deleting of attachments through Favorite answers

1765
5
06-19-2017 03:41 PM
NickMoore
New Contributor III

We have come across a critical flaw in the application which has resulted in the irretrievable loss of field data – obviously a major concern. The problem was noticed when Survey 123 hung up when submitting completed surveys, and had to be killed and re-opened – but the problem kept recurring.

On investigation we have identified the cause of the problem, which exposes a critical flaw in Survey123. A sample workflow is as follows:

  1. Field operator opens a new survey form, completes the survey and takes a few photos as attachments.
  2. The form is closed and Saved for Later in the Outbox.
  3. The form is re-opened for editing, and saved as a Favourite Answers template, then closed again.
  4. A new form is opened and answers pasted from Favourites. This copies the photo attachments as well.
  5. Since new photos are required, the copied photo image attachments are Deleted from the new survey. This deletes the images from the device.
  6. Now, the original survey form referencing the deleted images have orphaned attachment records, since the attachments no longer exist. This can be seen by editing the form in the Outbox, and noting a reference to the attachment, but with no image visible.
  7. Trying to Submit this form results in the application hanging.
  8. We can salvage the collected form data by editing & deleting each orphaned attachment in each form. The form can then be submitted successfully; however the attachment images are irretrievably lost!
  9. This is clearly a data collection disaster.

Comments 

  1. We can understand that some attachments may appropriately be saved as a favourite, eg a specification document relating to a specific asset type. It is therefore not a desirable option to prevent attachments from being copied over as Favourites. 
  2. What is critical, however, is that attachments deleted from a survey form should only delete the link to the attachment, not the attachment itself!
  3. Another option would be to clone attachments copied over as Favourites, in which case deleting them would not affect the original.
  4. We were running Survey123 version 2.1.6 on Apple iPads running iOS 10.3.2. Surveys were authored in Survey123 Connect, Windows x86 version 2.0.41; however the nature of this problem would indicate that it is not a device- or OS-dependent issue. Since we have been using Survey123 extensively, we would appreciate it if ESRI could give urgent attention to a fix.

We have logged a support call with our distributor Eagle NZ but are still awaiting a response.

Ismael Chivite

Malachy Carey

0 Kudos
5 Replies
IsmaelChivite
Esri Notable Contributor

Hi Nick. Thanks very much for the detailed notes. You raise a critical issue (as it involves data loss) and your suggestions for resolution are very useful. We will discuss how to better approach this. Thanks.

NickMoore
New Contributor III

Hi Ismael,

Have you made any further progress with this

Thanks

Nick

0 Kudos
NickMoore
New Contributor III

Hi ichivite-esristaff

How did you go with this issue. Any further progress.

Nick

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Nick,

In the 2.4 release, the behavior of Favorite Answers was changed to not carry over images into the new form- this should address this issue.

DaveMcPherson
New Contributor III

I see this issue was first raised in November 2016 by Jonathan Pendleton - but reported solved going from version 1.8 to 1.9!

The underlying issue seems to be that attachments are managed by a composite 1:Many relationship class, whereas the scenario described is actually a Many:Many association between attachments and surveys. Having a junction table between the image attachment table & parent table would allow the association record to be deleted while preserving the image saved as a blob in the attachment table. This would be a more elegant solution than cloning copied images, which could blow out data storage and upload bandwidth requirements and result in unnecessary duplication of images.

Nick Moore

Jonathan Pendleton

Ismael Chivite