Survey123 Report: placing attachments side by side (or each on a different line)?

5664
17
Jump to solution
06-21-2018 09:08 AM
HélèneTouyéras
Occasional Contributor II

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.

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

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.

View solution in original post

17 Replies
by Anonymous User
Not applicable

You can add a table to the print template and add an attachment to each cell.

0 Kudos
HélèneTouyéras
Occasional Contributor II

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.

0 Kudos
by Anonymous User
Not applicable

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.

HeleneTOUYERAS
New Contributor

Thanks Robb, I like this approach, which makes it much easier on the report side.

0 Kudos
MichelleWilliams1
Occasional Contributor III

Thank you, Robb, for your excellent attachments; it looks like I have to set my photos up this way too.

0 Kudos
by Anonymous User
Not applicable

Hélène,

Looks like you can use the table for repeats also

I included a quick photo repeat form and the print template

Robb

HeleneTOUYERAS
New Contributor

Thanks Robb, I edited the print template as follows:

  • Deleted two of the three table cells: the use of the reapeat will create as many cells as there are photos. With 3 cells in the template, each picture is inserted 3 times.
  • Added the end of loop marker just below the table, else the report creation throws an error:  ${/Start_Photos}

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 !!

DebsGray
New Contributor III

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

0 Kudos
JamesTedrick
Esri Esteemed Contributor

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.