Can I use an "if" statement to control the the group appearance in Survey123?

723
6
Jump to solution
05-07-2021 02:01 PM
JoseBarrios1
Occasional Contributor

I have the need to hide a group section that is relevant to a select_one (Yes or No) question. The workflow is that if the answer is "No", the group will not be visible; if "Yes", the group will be visible to pic a location from a geopoint. However I can't use the relevant field because I also need the geopoint to capture the coordinates for the "No" response. I try to just set up the group to a "compact" mode  on the appereance field using the if statement ( if (${beach_activity}='No','compact','')  but it does not work form me. Any suggestion on how this can be accomplish???

Thanks,

JB

 

1 Solution

Accepted Solutions
DougBrowning
MVP Frequent Contributor

It is new so if you have not updated your excel in a while then you will not see it.  Yes you can add it manually.  It is a true/false just like a relevant so you use it just like relevant.

In your example just ${beach_activity}='No' should do it.

View solution in original post

6 Replies
LisaDygert1
New Contributor

Hi JB,

 

I would recommend setting up two separate groups.  One for if 'Yes' is selected, and the other for if 'No' is selected.  You can use the relevance field for the group as a whole that way.

0 Kudos
DougBrowning
MVP Frequent Contributor

Use the new way to hide using the body::esri:visible column.  It is like a relevant but does not turn it to "" just hides it so it will still capture the coords.

Hope that works for you

JoseBarrios1
Occasional Contributor

Hello Doug,

I like your suggestion. However, I don't see the  "body::esri: visible column" on the version that I have 3.12.230. Do I have to add that manually? Do you have an example how this can be use to hide the content? Thanks for your time and help!

JB

0 Kudos
DougBrowning
MVP Frequent Contributor

It is new so if you have not updated your excel in a while then you will not see it.  Yes you can add it manually.  It is a true/false just like a relevant so you use it just like relevant.

In your example just ${beach_activity}='No' should do it.

View solution in original post

JoseBarrios1
Occasional Contributor

I created the column manually and it work great on windows app and phone. It does not work on the browser. Thank you very much for your help!

JB

0 Kudos
DougBrowning
MVP Frequent Contributor

It is brand new so may not be in browser yet.  I think coming in 3.13 in July but not sure.