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:
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.
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} ${/}${/}