Hello
I have created a form and I need to set up conditional visibility that will show a question if 'arable' is selected in one or more previous questions.
Question - Farm Type
Question - Main Enterprise
Question - Other Enterprises
If 'Arable' is chosen for any of the above questions I want to show the question 'Crops Gown?'
What expression do I need to use please?
Thanks
Solved! Go to Solution.
The overall syntax seems to be right, I would suspect spelling mistakes that make it fail to work as you expect it. Make sure to use the name, not the label, for the selection and double check the spelling of the question names especially upper/lower case. Do you still get an error or is it just now showing/hiding as expected?
The second syntax is not correct. Selected() takes 2 parameters - the question name and the choice you are looking for. You cannot add anything extra. You need to combine 3 selected() functions:
selected(${Farm_type}, 'Arable') or selected(${Main_farm_enterprise}, 'Arable') or selected(${Other_enterprises}, 'Arable')
The next thing to check is to ensure that you are using the name of the choices and not the Label value. Also, what column do you have your statement in, it should be in the Relevant or body::esri:visible column.
I managed to get it working, I was missing parentheses. Correct expression below.
(selected(${Farm_type},'Arable') or selected(${Main_farm_enterprise},'Arable') or selected(${Other_enterprises},'Arable'))
Thanks for all the quick responses and suggestions. Between them all I got it sorted.