Select to view content in your preferred language

Survey123 Report Builder Syntax to Negate Boolean Value

139
3
Jump to solution
3 weeks ago
SeannaORegan
Emerging Contributor

Hello,

I was wondering if there's a way to negate a return value in report builder. Specifically, I have:
${if visited_sites | selected:"003"} ... ${/}
and I want to know if there is a way to return true when "003" is NOT selected. Should I use this same syntax and negate it somehow, or am I going about this in the wrong way?

Thanks 🙂

0 Kudos
1 Solution

Accepted Solutions
abureaux
MVP Frequent Contributor

Try

${if !(visited_sites | selected:"003")} ... ${/}

View solution in original post

0 Kudos
3 Replies
abureaux
MVP Frequent Contributor

Try

${if !(visited_sites | selected:"003")} ... ${/}

0 Kudos
SeannaORegan
Emerging Contributor

That worked, thanks! I figured it would involve '!' somehow, but wasn't sure how to go about it. Is there documentation somewhere with the syntax for report builder? I typically just refer to the Quick Reference Guide, but it never mentions the ! operator. 

0 Kudos
abureaux
MVP Frequent Contributor

This is the primary location for Feature Report info: Report templates

I find it a little ambiguous on a few topics, but it is my go-to for mostly everything to do with Feature Reports.