If statement with check boxes in Survey123 Reports

02-26-2021 01:59 PM
Occasional Contributor II

Hi all,

I'm struggling with the syntax for nesting an if statement with a check box (selected) statement in making a report template. 

The syntax checker in uploading test templates clears my basic checkbox statements, e.g.:

${ResponsibilityArea | selected: “Local”} Local Responsibility Area (LRA)

${FireHazard | selected: “VeryHigh”} Very High Fire Hazard Severity Zone (VH FHSZ)

Is it possible to use a conditional statement on this field to create a a separate checkbox? For example, in plain-ish English: If ResponsibilityArea is "Local" and FireHazard is "Very High," create a separate checkbox in the report that reads "VH FHSZ in LRA"?

I have tried multiple iterations of if statements but I don't know how to structure the 'selected' bit to generate a check box. Is this even possible?


0 Kudos
1 Reply
Esri Contributor

Hi Travis,

You could use this syntax to generate a checkbox based on multiple fields: 


${if ResponsibilityArea| selected:"Local"} ${if “FireHazard” | selected:"VeryHigh"}

☑ VH FHSZ in LRA ${/}${/}


Another approach would be to create a "VH FHSZ in LRA" field in your survey that is calculated based on the ResponsibilityArea and FireHazard fields. You could then use that field to generate the check box in your report.


0 Kudos