Using relevant expression to hide group of questions

2372
4
Jump to solution
06-15-2017 08:15 AM
MargueriteDonohoe
New Contributor II

I can't get the relevant expression to work in order to hide a group of questions.

XLSX attached

If the Playground_Location is The Mall Playground I want a group of questions to appear that relate to outdoor equipment the is only available in this playground.

the expression I am using in the Relevant column of the Outdoor_Equipment_Checklist group is: ${Playground_Location}='The Mall Playground'

Does this expression have to be applied immediately after the select_one question?

Any help much appreciated.

Thank you.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

The relevant statement needs to use the value of the name of the choice, not the label.  in your form "The Mall Playground" has the value of 57.  This is also what is recored when you submit data.  Note that due to text/number conversion issues, the actual value to compare against may be "57.0"; this can be avoided by explicitly making the name values text in the Excel file (placing an apostrophe (') before the number will do this).

View solution in original post

4 Replies
JamesTedrick
Esri Esteemed Contributor

The relevant statement needs to use the value of the name of the choice, not the label.  in your form "The Mall Playground" has the value of 57.  This is also what is recored when you submit data.  Note that due to text/number conversion issues, the actual value to compare against may be "57.0"; this can be avoided by explicitly making the name values text in the Excel file (placing an apostrophe (') before the number will do this).

MargueriteDonohoe
New Contributor II

Thank you James this really caught me out.

0 Kudos
Lake_Worth_BeachAdmin
Occasional Contributor III

what if I want it to not equal multiple values

if ${question_1} !='value1' OR 'value2'

can this be accomplished? it works when I have 1 value but I need to add additional values to the !=

how do I get Value2 to be used

0 Kudos
Lake_Worth_BeachAdmin
Occasional Contributor III

 I got it to working using AND

${question}!='Value1' and ${question}!='Value2'

0 Kudos