Relating attachment from an existing Feature Layer in a new survey created on top of this Feature layer

1037
4
02-22-2021 07:28 AM
AlainChouinard
New Contributor III

Hi all,

I created a survey on top of an existing feature layer on AGOL.

The existing feature layer has attachments enabled so that pictures can be taken for each record, if needed, in Collector. In fact, the goal is to replace the use of Collector with the use of Survey123 in the field. I set up an image-type question in the new Survey123 so that I can take pictures with Survey123. Everything works fine except for this detail: I would have like to see the photos of the previous records coming from Collector in the Photo Library of the Survey123 website in the Analysis tab, in the section related to this new image-type question, but old photos do not appear. When I donwload the Feature Layer in GDB format, all attachments, old ones from Collector and new ones from Survey123, are contained in the same _ATTACH table, so I suppose that they are stocked the same way in the Feature Layer.

Is there a way to relate the old attachments already existing in the Feature layer to this image-type question in the new Survey123 survey, so all attachments will appear in the Image Library? It would be very nice!

Thanks!

0 Kudos
4 Replies
IsmaelChivite
Esri Notable Contributor

Hi. Survey123 uses attachment keywords to categorize them according to the name of their corresponding question in the smart form. Unfortunately, Collector does not support attachment keywords, so any image you already have will not have attachment keywords. Without attachment keywords, it is not possible to know what is what among the attachments. That is why the website and reports can place them accordingly.

About 2 years ago, we put together a sample ArcGIS Pro tool to assign attachment keywords to existing attachments. The tool essentially downloads exiting attachments using Python an then uploads them back with the keyword you define. You can find it attached. This tool is not supported and I am not sure it works anymore with the latest version of ArcGIS Pro. However, if you feel like taking this as a starting point and share with the rest of the community, I think a few people will appreciate it.

0 Kudos
MicZatorsky_AEC
Occasional Contributor III

Ismael, I have a puzzle where I want  to add bulk records with photo and sketch attachments to an existing survey using the Append tool in Pro.    I've found that it mostly works but photos and sketches are never properly associated with their questions .   I asked about this a couple of times with no response from community or devs, but considering your answer above, are "attachment keywords" required to solve my issue?

If so, where can learn more about attachment keywords and how do I best prepare new photos and sketches for attachment?  Are they Exif tags I can set through file properties?

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi. The attachment keywords are not part of the EXIF. They are a property of ArcGIS attachments that can be set by applications like Survey123.  As I described in my response above in this thread, it is possible to associate Keywords with existing attachments using Python. The script I provided was functional in the past but it will need some love to get back up again.

MicZatorsky_AEC
Occasional Contributor III

Thank Ismael,  I appreciate the script works with existing attachments.   I'll need to see how it works with new attachments - unless the workflow needs to be attach new photos, upload (append), then download, define keywords, then re-upload. 

0 Kudos