Select to view content in your preferred language

Is it possible to dynamically hide parts of a report template?

1000
3
08-10-2023 08:04 AM
Ric_Reynolds_MGISc
New Contributor

Hello Survey123 Community!

Has anyone worked with dynamically hidden parts of report templates (word docs)? 

I am trying to enable conditions on the report template to show or hide features based on a prior question in the survey response.

For example using photos: when a field representative takes photos on a project then the photo table on the report template is toggled to visible. If they respond "no" to a yes/no that they did not take photos, then the photo table is not visible on the final report. 

As the report currently stands, the photo table is shown on the generated PDF report regardless of whether or not there is content to populate the table. This results in a blank table on the final report when the field representative doesn't take photos. 

In this situation, photos are just the example...I'd like to do this "show/hide" function with text or numerical calculations. 

Please let me know if you need more information.

Thank you for your time.

 

0 Kudos
3 Replies
BarbaraWebster1
Esri Regular Contributor

Hi @Ric_Reynolds_MGISc,

You should be able to do that with conditional report elements. Have you looked into that method?

Thanks,
-Barbara

0 Kudos
CyndyJBresloff
Occasional Contributor

I have a question following up to this one: if I wanted to use a conditional report element with a condition of whether or not a given field (ie text box) was null (empty) or not, what would be the syntax for that expression?  Thank you!

0 Kudos
BarbaraWebster1
Esri Regular Contributor

Hi @CyndyJBresloff,

For that you would just include the question name after the 'if' in the starting tag. This example from the documentation uses an image question, but this will work with other question types also: 

${if photo1} displays the section only if the photo1 question has been answered.

-Barbara

0 Kudos