Select to view content in your preferred language

Images in Template - Remove if there are none - Change spacing

329
6
Jump to solution
08-12-2025 09:40 AM
MeleKoneya
Frequent Contributor

I have a survey with multiple photos possible.    

In my word docx template I have the following which will include all photos taken.

 ${#picture_of_front_yard}${$file | size:150:0}${/}

I'd like to do two things.   

  • If no pictures, hide this from the taking up space in the report
  • Add a border around each photo
    • Right now they look like this and I would like a little separation if possible. 

MeleKoneya_0-1755016703152.png

Thank you,

Mele

0 Kudos
1 Solution

Accepted Solutions
MattEdrich
Frequent Contributor

I don't use Survey123 for reporting anymore, but I reckon you could get creative with concatenating the image with a string to achieve the kind of border I think you are describing. Totally untried guess here, but something like 

${if picture_of_front_yard}${#picture_of_front_yard}${$file | size:150:0}+ ${/}${/}

You may have to jigger the location of the + and the empty space following it, I'm not sure if the classic empty string ( '' or "" ) would work here.

Also, just a friendly suggestion, when I was working in Survey123 reports I found it insanely useful to color-code my content-control logic (like the blue text above) so that maintaining templates and changing them over time was less of a lift in the long run.

View solution in original post

6 Replies
MeleKoneya
Frequent Contributor

This worked for hiding the image section if no images exist.    Just need the border if anyone has suggestions

${if picture_of_front_yard}${#picture_of_front_yard}${$file | size:150:0}${/}${/}

0 Kudos
ZenMasterZeke
Frequent Contributor

In the body::esri:style column for the group with images, you can add borderColor ="white", or whatever html color name hex code you want. I don't think this works in grid style though. Also doesn't work in the web app.

Style a survey—ArcGIS Survey123 | Documentation

MattEdrich
Frequent Contributor

I don't use Survey123 for reporting anymore, but I reckon you could get creative with concatenating the image with a string to achieve the kind of border I think you are describing. Totally untried guess here, but something like 

${if picture_of_front_yard}${#picture_of_front_yard}${$file | size:150:0}+ ${/}${/}

You may have to jigger the location of the + and the empty space following it, I'm not sure if the classic empty string ( '' or "" ) would work here.

Also, just a friendly suggestion, when I was working in Survey123 reports I found it insanely useful to color-code my content-control logic (like the blue text above) so that maintaining templates and changing them over time was less of a lift in the long run.

MeleKoneya
Frequent Contributor

Thank you @MattEdrich  I will give that a try the suggestion.    I also like your idea of using the color coding.  Working in Word is no fun to begin with and then even more compounding when adding these tags.

0 Kudos
MeleKoneya
Frequent Contributor

Thank you @MattEdrich I am still playing around but your idea makes space as I wanted.   One thing I did was make the font 'white' and it looks good.     Thank you for the suggestion.

MeleKoneya
Frequent Contributor

MeleKoneya_0-1755297754049.png

 

0 Kudos