Survey 123 Custom Report Conditional Statement

472
1
02-23-2021 03:28 PM
DoriBro
New Contributor

I've attached a report template (WC_TempWIP021821.docx) and one output report (Culvert_February_18_2021_DNR.docx).  The report template utilizes many conditional If statements so that only the questions that were answered will show up in the output report.  The custom report is working but it seems to add a bunch of extra lines between some of the sections of the report so it looks a bit sloppy.  You will see in the output report the "Crossing Information" section and "Was Follow Up Needed" section has multiple lines added.  I'm thinking it has something to do with the numerous "If" statements required because there are many different types of crossings that the survey handles.   

I'm wondering is there is a workaround for this or a better method of writing the If statements to generate a cleaner looking report.  Thanks in advance for any advice.

0 Kudos
1 Reply
BarbaraWebster1
Esri Contributor

Hello,

You could eliminate the unwanted returns in the exported report by placing those returns inside the conditional statement in the template report. For example, if you change this:

BarbaraWebster1_1-1617052558776.png

 

to this:

BarbaraWebster1_0-1617052498222.png

there will only be a return after the ${if WaterType | selected:”fish_water”} section if that section is shown.

Thanks,
-Barbara

0 Kudos