Select to view content in your preferred language

Survey123 Report Syntax Select Multiple Help

240
1
03-04-2025 06:01 AM
aprhyde11
Emerging Contributor

I'm working on a report template for my survey123 data. I need it show the corresponding answer only if "no" is selected on another question.

These are the questions aprhyde11_0-1741095490503.png

These are the possible answers aprhyde11_1-1741095640275.png

If accessible=yes, I need my template to return N/A

If accessible=no, I need my template to return the answer to inlet_outlet

This is what I have been using variations of 

${if accessible==”Yes”}N/A${/}

${if accessible==”No”}

${if inlet_outlet | selected:"NA" && inlet_outlet | selected:"Inlet"} && ${inlet_outlet | selected:"Outlet"}Inlet and Outlet ${/}

${if inlet_outlet | selected:"NA"} && ${inlet_outlet | selected:"Inlet"}Inlet ${/}

${if inlet_outlet | selected:"NA"} && ${inlet_outlet | selected:"Outlet"} Outlet ${/}

${if inlet_outlet | selected:"Inlet"} Inlet ${/}

${if inlet_outlet | selected:"Outlet"} Outlet ${/}

${if inlet_outlet  | selected:”NA”} N/A${/}

${/}

This is the output I get on my sample reports for when accessible=no and inlet_outlet=Inlet and Outlet 

aprhyde11_2-1741096708635.png

I need the output to only say "Inlet and Outlet". I would also like the check box gone.

 

Thanks in advance!

0 Kudos
1 Reply
AnninaRupe1
Frequent Contributor

If I'm understanding correctly, I would try something like this in the calculation field:

if(selected(${accessible},'No'),"N/A","Inlet and Outlet")

If the accessible question is marked "No," return "N/A," else return "Inlet and Outlet."

 

0 Kudos