I have had success writing templates for reports that I have generated using Suvrey123. I currently have Field Maps and Survey123 connected, and have created a related table for the inspection rerecords I plan on collecting. The issue I am having is that I can not figure out of to write the correct syntax that will enable me to pull information from the most recent record in the related table and its attachments. The attachment part is where I am stuck and struggling with because I need to pull the photos that were taken for that specific record. It feels like it is possible, but I just can not figure this one out. Any help on this would be appreciated. Thank you.
How are you collecting your photos? Is it in Survey123 and if so, are you using multiline or a repeat for the photos?
Photos are being collected through Field Maps which this sytanx works for pulling the photos (attachments) from the Parent:
${#$attachment} ${$file | getValue:”” | size:330:0} ${/}
But when trying to pull the attachment from the Child (related table) is where I am stuck. I am using a repeat which works for the attribute data. I have also tried using Survey123 Report's quick reference, but that does not seem to help. So I must be missing something. Hopefully this helps. Thank you.
Esri says this:
To return multiple images submitted to the same question in a response, use the following placeholders with each placed on a dedicated line:
${#image1} ${$file} ${/}The $attachment keyword can be used to iterate all attachments of the current feature:
${#attachment} ${$file} ${/}
I think the problem might be that you have ${#attachment} ${$file | getValue:"" | size:200:0} ${/} on the same line and it can't iterate through all of them. All my templates that iterate through multiple photos follow the direction of each placeholder on a new line, and since you're getting one image to appear, I think that is likely your problem. Format your attachment like as below and see what it does.
${#attachment}
${$file | getValue:"" | size:200:0}
${/}