Good afternoon,
Is it possible to use some smart syntax in Survey123 report templates to avoid attachment piling up on top of each-other?
My survey has its "image" field within a repeat, so people can take several pictures of the feature they are surveying, for instance to show the different issues on the same feature.
I downloaded the report template and reused the part about the attachment without modification:
${#attachments}
${attached_item | size:250:0}
${/attachments}
When creating the report for a feature with several attachements, all the attachments are ported in the report, but they are all placed on top of each other.
EDIT: the above syntax will place each picture on its own line, it is okay. I realize I did wrong when actually using:
${#attachments} ${attached_item | size:250:0} ${/attachments}
I was wondering if there is a way to iterate through the attachments, so that I place the first one found on the first page, and all attachements (to make it simpler) at the end of the document, that is, all of them side by side or each on its line, but not on top of each other.
Any help greatly appreciated!!
Hélène.
Solved! Go to Solution.
I’m not using a repeat for photos since I am limiting the photo section to 4 photos, this can be increased to whatever. I have each photo section compacted until a question is asked. This way each photo is individually labeled.
I don’t think this can be done with repeats since each photo has a random name.
Here is a photo capture template and the print template that goes with it.
Hope this helps.
You can add a table to the print template and add an attachment to each cell.
Thanks for your reply, Robb! I am not managing it, tough.
In the XLS used to design the survey, the field used to store attachments is called attached_item
Inserting ${attached_item1 | size:250:0} in the template returns "undefined" in the report.
I tried this line alone first , and then as :
${#attachments}
${attached_item1 | size:250:0}
${/attachments}
in the latter case, I obtained as many "undefined" lines as I have attachments. The attachments where taken with the phone's camera, their have long suffixes, such as "attached_item-20180622-072455.jpg".
Not sure what I am doing wrong - What do you think I shoudl try?
Many thanks again!! & a good week-end!
Hélène.
I’m not using a repeat for photos since I am limiting the photo section to 4 photos, this can be increased to whatever. I have each photo section compacted until a question is asked. This way each photo is individually labeled.
I don’t think this can be done with repeats since each photo has a random name.
Here is a photo capture template and the print template that goes with it.
Hope this helps.
Thanks Robb, I like this approach, which makes it much easier on the report side.
Thank you, Robb, for your excellent attachments; it looks like I have to set my photos up this way too.
Thanks Robb, I edited the print template as follows:
The resulting template is attached.
Using the repeat is convenient for users, but can make the report design more complex when you have to deal with many pictures. I still wonder whether there is a way to catch the first photo in the repeat to illustrate the report's first page, and put all other pics in appendices. In that regard, your solution of inserting several "single photo" questions is better than mine - the print template is easier to design. Thanks for your help !!
Hi, I was wondering if anything has progressed from this? I'm trying to put my photos (repeat question) side by side, but they just go on top of each other. Is there anything we can change in the syntax so that they can be displayed side by side?
Thanks
survey123 feature report Survey123 Geonet
Hi Debs,
This has been taken down as a possible enhancement to the feature report service but no work has been done to implement this to date.