I made a survey where I restrict some questions based on previous answers. For example, early in the survey I ask “how many boys ages 0-17 live in your household.” The response is an integer greater than 1. Later, I ask “how many school-aged boys ages 0-17 currently work?” The answer is meant to be restricted only to households who indicated that they had at least 1 boy age 0-17 living in the household. I used “selected(${male_0_17},’. >= 1’)” in the “relevant” column, but the survey instead just removes the question altogether. Is there a better way to do this?
Hello,
If you have an integer type you will not use selected( ), but just the greater expression. selected( ) is only used for select_multiple type (also works for select_one type)…
Hi both - thank you for the support. @Kal_Lam : correct - Q2 should pop up only if Q1 is >=1. I’ve removed the selected() but am still having difficulties, getting the error message “FormLogicError: Could not evaluate: /model/instance[1]/data/survey/male_0_17 ,.>= ‘1’, message: The expression is not a legal expression. (line: undefined, character: undefined)”. I have tried numerous iterations:
${male_0_17}, >= ‘1’
${male_0_17}, ‘>= 1’
${male_0_17}, = ‘1’
All of them give the same error message. Thanks for your help.