Select to view content in your preferred language

Remove empty images from report

449
2
03-22-2024 03:19 AM
BenBlowers2
Occasional Contributor

Hello,

I have a survey which asks lots of questions and lots of photos can be taken (multiline so more than 1 photo can be submitted for each question).

When the report is produced from Survey123, if a photo was not taken, it displays an empty thumbnail, like in the 1st attached screenshot.

What syntax can I use to only display the image question answer if an image was actually taken?

I tried:

${#AIC_BuildingFloorplansImage}${if $file | size:0:0:0:250}${/}${/}

But this did not work - no images were returned yet Survey123 could not detect any errors with the syntax when saving the report template.

Thank you,

Ben

0 Kudos
2 Replies
ArielRetuta
Emerging Contributor

Have you found or received a solution for this? I am having the exact same issue and it's driving me nuts!

0 Kudos
ArielRetuta
Emerging Contributor

I was able to make this work with the following: 

{#image}

${if $file}

${$file|getValue:""|size:150:0}

${/}

${/}

Apologies for the weird spacing, this is my first time posting a solution (yay!). Hope it helps. 

0 Kudos