Populate field with photo filename

3135
8
06-28-2018 09:49 AM
peterbrad2
New Contributor III

Is it possible to populate a text field using the photo filename survey123 assigns to a photo that has been captured?

For example, say I take a photo and survey123 assigns the following name image-20180627-210709.jpg, can I populate a subsequent text field with that filename? I keep getting requests at work for the reports to contain not only the image but also the image name.

8 Replies
IsmaelChivite
Esri Notable Contributor

While it is not possible to capture the filename as a GIS attribute through an XLSForm calculation, you can incorporate the following into a Custom Feature Report:

${imagequestion | getValue:"name"} returns the filename

To learn more about Custom Feature Reports, have a look at this blog post: https://community.esri.com/groups/survey123/blog/2017/07/26/introducing-custom-form-report-templates... 

Obtaining the filename of an attachment (Signature, Photo, Annotate) would be a logical enhancement to add. I will add to our backlog.

MarkSchiavone
New Contributor

${imagequestion isn't recognized by Survey123 and it rejects any document template with that term. However, using

${Photo | getValue:"name"}

works perfectly. When working with multiple photos within a #PhotoGroup ... /PhotoGroup loop, just remeber to place ${Photo | getValue:"name"} within the loop (ideally, either before or after the ${Photo } tag.

BryceHancock
Occasional Contributor

Has an update been issued to allow capture of the photo filename in a Survey123 form field? We would like this feature for our forms too. Thank you.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Bryce,

You can record the filename in another field by having a calculation that refers to the image question - see the attached sample.

CaseyJustice
New Contributor II

Thanks a lot for adding this functionality. Very helpful and easy to implement.

0 Kudos
FRSadmin
New Contributor III

I must be doing something wrong, because me simply copying ${image} into the calculation field is yielding me an error.. pull function?

0 Kudos
trashbaby
New Contributor II

Is it possible to include more than image name in the calculation?

I want a field that includes all of the image names for the entire survey, separated by commas.

0 Kudos
FRSadmin
New Contributor III

Hello @JamesTedrick Has there been a different implementation of this?

I have not yet implemented this into our surveys, but our environmental team takes many photos, can this be done with one text field? Where the image names are separated by commas, or do you need one text field after every photo?

0 Kudos