Select to view content in your preferred language

Survey123 Connect body::esri:visible expression

367
5
07-23-2024 04:38 PM
TKSHEP
by
Frequent Contributor

How would I use an expression in body::esri:visible to show a field if it does not contain?  I tried ${device}!='Texas' and ${device}!='Arizona' and ${device}!='Nebraska' however it still does not show the filed if it is not those area's.  Any help would be greatly appreciated.

 

Thank you!

5 Replies
abureaux
MVP Frequent Contributor

Doesn't contain what, exactly? Is that a "State" dropdown menu?

Also, you may wish to try "or" instead of "and"

0 Kudos
TKSHEP
by
Frequent Contributor

Tried both "and" and "or", still no go.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Few things to try.

First is this a select one or select multiple?

Second are you checking the Name or Label value?  You need to check the name value from the list.

Third I have sometimes seen != getting weird if there is no spaces.  Try  ${device} != 'Texas' 

Fourth if none of that works try not(${device} = 'Texas')

Hopefully one of those does it.

0 Kudos
TKSHEP
by
Frequent Contributor

${device} value is a text value, and I have tried all of the above, the not statement, the spaces.  Still not working, unless I am unable to do it with a text box value.

0 Kudos
abureaux
MVP Frequent Contributor

These equations are caps sensitive.

  • If this is a "text box" that allows open input, then this likely won't work well. People misspell worsd (haha?) all the time.
  • If this is a drop down such as a select_one or select_multiple, be aware that you need to reference the name rather than the label. For example, using the below image as reference, selected(${my_question},'yes') will work, while selected(${my_question},'Yes') will not work
    abureaux_0-1721845635227.png

     

0 Kudos