Feature report syntax for attachments

1535
3
07-19-2021 09:08 AM
ryanEvanczyk
Occasional Contributor

${#$attachment}

${$file}

${/}

My problem originated because I appended the data from an old version of the survey into a new survey in AGOL which dropped the attachments. We had the attachments appended back into the database with ArcGIS Pro, but now the original syntax returns an empty space. My survey has two image (signatures) attachments for each record. One signature is from a patient and collected half way through the survey, the other is the provider's collected at the end. The above syntax pulls the attachments, but both signatures are displayed. Is there a syntax to pull the appropriate signature for the appropriate space?

The field names are form_patsign and form_ptsign.

Thanks,

RyanE

0 Kudos
3 Replies
Ruth_JiatengXu
Esri Contributor

Hi @ryanEvanczyk 

Thanks for sharing here! You could try ${#form_patsign}${$file}${/} and ${#form_ptsign}${$file}${/}  (DOC: https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm

The report service finds the image for a certain question by looking for the image which has the question name in the keywords property. Therefore, if the feature layer does not support keywords on image or the image is attached outside of Survey123, the report might not be able to distinguish which image is submitted from which question.

Thanks,

Ruth

 

0 Kudos
ryanEvanczyk
Occasional Contributor

Thanks for the response @Ruth_JiatengXu 

Is there a way to enable keywords on a layer in AGOL? The report templated saved, but the fields were simply empty.

Our need for printing is minimal. It seems like I could just change the syntax to have the image web location for each signature for each form I need to print? I would have to customize each feature report, but like I said it's only a few a year.

Cheers,

RyanE

 

0 Kudos
Ruth_JiatengXu
Esri Contributor

Hi @ryanEvanczyk 

There is a tool called Upgrade Attachments in ArcGIS Pro that can be used to add the keywords field to the attachment. After that, you may need to add the associate questionName to each attachment which may take some effort. Basically, you have to export all images and add them again with keywords. 

Here is the related DOC: https://support.esri.com/en/technical-article/000024606

A post with the Python script to automate the work: https://community.esri.com/t5/arcgis-survey123-questions/is-there-an-easy-way-to-update-the-keyword/...

Or, as you said you could use the below syntax to print a specific image.

${$image | src:"https://upload.wikimedia.org/wikipedia/commons/1/13/Esri_Headquarters%2C_Building_Q.jpg" | size:400:0}

Thanks,

Ruth