I know you can put if statements on the survey form fields, but I'm wondering if there is a way that only the populated fields show up in the generated feature report?
Currently, I have:
What is the name of this location? ${if SiteName}${/}
Is there a way that the question in bold that I've put in my word template doesn't appear if Site Name is blank in the survey? Is there an if statement I can apply to the whole structure?
I hope this makes sense!
Hello Debs,
I've done this type of setup in reports when using select one questions to filter sections of the report or individual questions. I've never done it just with answered or not but I've tested this syntax today and it worked for me. The condition you have looks correct but you can put it around the whole question as long as you qualify the response. Format would be something like this:
${if SiteName != ""} What is the name of this location? ${SiteName}${/}
Hi Ingrid
This is exactly what I wanted, thank you so much!
Perfect! I will definitely make use of this
Hi Ingrid Aldridge
I've now tried that with photos and it doesn't seem to work, Photo #2 still appears even though there's no photo assigned to that field. Do you know if I need to change the syntax slightly?
Currently, I have:
${if Photo2 !=””}Photo #2 ${Photo2 | size:200:0}${/}
Thanks!
Hi Debs,
You would definitely need to change the syntax. I'm not 100% certain to what. The photo is treated as an attachment and therefore there isn't actually a field. The only way I've done photos that is similar is with a secondary field as well. I always have a caption field with my photos so mine look like.
${if cap_photo1} ${img_photo1 | size:300:0}${/}
That will put the caption before the image but only shows both if the caption has been filled in.
Sorry, I'm not sure what else you could do with the photo option.
Hi Ingrid
Ah I see what you mean, that's helpful, thank you!