Relevant if 'X' not selected syntax

3931
5
Jump to solution
06-08-2018 05:12 AM
ThomasPerriment1
New Contributor III

I'm currently pulling data through from a csv attached to my survey based on a Location ID field. However if that data changes on site, I have added in a select multiple so the user can chose to change one of those details.

My issue is that I want the data draw through to be hidden should the user select the relevant box, such as in the images below where Location Type is ticked (I would want Location Type data draw through to disappear).

I have tried using the selected operator in various forms, but that only presents the field in case of a true return. I'm wondering whether it can test for an "unselected" feature, such as notselected(${LocationDetails}, 'Location_Type') so that the field only appears when Location Type is selected. I would link it to a master question (such as "Have the location details changed?" but that knocks out other functionality.

Any suggestions? Thank you.

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Thomas,

One way to do this would be to compare the result to false():

selected(${LocationDetails}, 'Location_Type') = false()

View solution in original post

5 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Thomas,

One way to do this would be to compare the result to false():

selected(${LocationDetails}, 'Location_Type') = false()

ThomasPerriment1
New Contributor III

Hi James,

Thanks for the quick response! I didn't know you could compare to false, thanks for showing me how. All working as desired now.

Thanks,

Thomas

0 Kudos
ColeMcLaughlin
New Contributor

Hi James, this is the closest thread I can find to the question I have.  I want to make a group of questions in Connect only relevant if a response to a previous question is not selected.  Your solution with ()false sounded good but I cannot get it to work.  This is the direction I was going to try and have a group of questions be relevant if you do not select Nail Salons:

notselected(${WORKPLACE}, 'Nail Salons | Salones De U??as')

Any help would be great! Thanks.

0 Kudos
BabatopeAdebajo1
New Contributor III

Hi James,

This formula only works after the option has been selected, i am trying to hide some subsequent questions with the not(selected${},'')  but the questions show up before this condition is met, do you have any ideas why?.

Teresa_Blader
Occasional Contributor III

Incase this is still a question, I was able to do this by adding this formula to "relevant" on a begin group line. The question it is referencing (Donation_Days) is outside of this group, just prior. 

count-selected(${Donation_Days}) > 0 and selected(${Donation_Days}, 'Appointment') = false()

 

A user selects day(s) of the week a business accepts donations, then the group prompts entering hours for a day that is selected. However, I didn't want the "hours" group to show up unless one of the days was selected. So this formula says: something has to be selected, and it shouldn't be 'Appointment'. Otherwise the 'hours' group is not visible.

Prior to adding the 'Appointment' option to the survey choice list for that question, relevant just said:

count-selected(${Donation_Days}) > 0
Teresa Blader
Olmsted County GIS Specialist
0 Kudos