Select to view content in your preferred language

Struggling with photos in Survey123 Connect Report

400
2
09-01-2023 09:29 AM
Eimear
by
New Contributor III

Hi all.

I'm trying to add photos to my report, when they are taken by the user and to leave it blank when no photos are taken.  The photos are added to the report okay with syntax below. But when the user does not take any photos, the text and a blank box still appear in the report. I would like for these not to appear as they take up space. Any help appreciated?

Syntax:

${if lrepeatphoto}Photos ${#lrepeatphoto}

${imageQuestion}

${livingLabel} ${/}${/}

 

Result when no photos submitted:

EimearTuohy_0-1693585755022.png

 

Tags (2)
0 Kudos
2 Replies
IsmaelChivite
Esri Notable Contributor

I think the problem is that the expression if lrepeatphoto always returns true, even if you have no rows within the repeat. I suggest you add a hidden integer question outside the repeat to count the number of photos in the repeat: count({$imageQuestion) should do.  Then, in your report, you will use that integer value in your expression  if photoCount>0.

 

Eimear
by
New Contributor III

Hi @IsmaelChivite 

Thanks so much for the swift reply and solution. I tried another version of my original expression and it seems to work too.

 

${#lrepeatphoto}${if imageQuestion}

${imageQuestion | size:400:0}

${imageslabel} ${/}${/}

0 Kudos