Select to view content in your preferred language

Survey123 -- relevant field won't allow two values

9893
9
Jump to solution
01-09-2017 04:58 AM
KendraStraub
Occasional Contributor

Hello, 

I would like to make groups in my Survey123 form relevant depending on the response to another question. 

The question is which protocol the end user is using: Crown Health, Biocontrol, or Both. 

If they select Both, I would like both groups (Crown Health and Biocontrol) to be visible/relevant. Is they select Crown Health, I would like to make only the Crown Health group relevant/visible. Is they select Biocontrol, I would like to make only the Biocontrol group relevant/visible. 

I have tried the following in the group relevancy for the Crown Health group:

${Protocol} !='Biocontrol'
${Protocol} ='Both' OR ${Protocol} ='CrownHealth'
${Protocol} ='Both' OR 'CrownHealth'
${Protocol} ='Both' , 'CrownHealth'

None have worked, can anyone help out with this one?

Thanks,

1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

The statement

${Protocol} = 'CrownHealth' or ${Protocol} = 'Both'

works for me.  Note the lower-case 'or'.

View solution in original post

9 Replies
JamesTedrick
Esri Esteemed Contributor

The statement

${Protocol} = 'CrownHealth' or ${Protocol} = 'Both'

works for me.  Note the lower-case 'or'.

KendraStraub
Occasional Contributor

Perfect! Thank you. I didn't know it was case- sensitive. Thanks for your rapid response. 

0 Kudos
BuffaloCoWI
Frequent Contributor

I have a similar question a regarding "select_multiple." As of right now I can only get only one of the selected groups to be viable at one time.. Selecting more than one makes them everything disappear.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

As opposed to the "question=value" formula pattern, you probably want to use the "selected(question, value)" function - Relevant expressions—Survey123 for ArcGIS | ArcGIS 

BuffaloCoWI
Frequent Contributor

Yep that did the trick... I hadn't seen that bit of info.

Thanks James...

Jason##

0 Kudos
BuffaloCoWI
Frequent Contributor

How would I approach a "Select_one" where I need to assign a numerical value to each choice so that a calculation can be made against the selection?  I would assume that this must be simple... but the proper syntax is just escaping me for the calculation.   Any thoughts?

list_namenamelabelvalue
holesizeholesize11/4 inch2.5
holesizeholesize23/16 inch3.5
holesizeholesize35/32 inch4.5

typenamelabelcalculation
select_one holesizeholesize_calcHole size calculation

(????) * (1.3)

0 Kudos
JamesTedrick
Esri Esteemed Contributor

A few issues probably are tripping you up:

1) In your list, the 'name' column should contain the values you are going to use in the calculation

2) The calculation should be in a second question, either decimal, calculate, or note (decimal gives the opportunity for user input if the calculation is only a reasonable default that can be corrected, calculate will store the answer without the user seeing, note provides a read-only reference to the user).  

To take your tables above:

list_namenamelabel
holesize2.51/4 inch
holesize3.53/16 inch
holesize4.55/32 inch

typenamelabelcalculation
select_one holesizetarget_sizeTarget diameter
decimalholesize_calcHole Size calculation

${target_size}*1.3

0 Kudos
BuffaloCoWI
Frequent Contributor

Yep that worked perfectly.. having the value in the name field was this issue. what was tripping me up was that in the survey tab for name it forces strings.  I didn't realize it would be different for choices.  Makes total sense now.

Thanks again James... you've been a huge help.

Jason

0 Kudos
MilesMcCoy-Sulentic
Emerging Contributor

new to survey123 and not sure if this is the right place for this question, but I want to pop up a warning note if a species is observed outside of it's known range, based on county. I am using a cascade select and a repeat question to record all species found at a site. My species data also has a column with a comma-separated list of counties where it is known to occur. I was thinking that I could use a relevant statement for a note that would occur only when the survey location county string is not found in the list of "Range" counties for each species, but I'm struggling to piece it together.

Thanks

Survey Tab

typenamelabel
textexampleExample
select_one countycountyCounty
begin repeatplantListSpecies
select_one speciesspeciesSelect Species:
end repeat
noteoutside known range

example of species data from choices tab

list_namenamelabelRange
speciesPseudelymus_saxicolaPseudelymus saxicolaBeaver, Box Elder, Cache, Carbon, Daggett, Davis, Duchesne, Emery
speciesAbies_sp.Abies sp.Cache
speciesAchnatherum_parishiiAchnatherum parishiiCarbon, Daggett, Davis
0 Kudos