I have group that contains five select multiple from list questions. I want to make the survey only allow you to answer any combination of two of them. I made this work for a separate group of three questions. However, with five, it seems to cause some issues. Below is from my three-question group that works perfectly, and my five question group I am having issues with. I decided to use string length as the delimiter for anything that is answered having more than 0 as a string length.
I tried adding a condition to body::esri:visible with the statement below, for the "None" question as my start point.
This statement works when I check any combinations that include (rip_width_wide) and (rip_width_moderate) being answered with any one of the other questions in that group also being answered. (e.g., width is answered, and upon answering moderate, the questions for Narrow, Very Narrow, and None become invisible). However, if I answer Narrow, or Very Narrow first, None goes away.
My guess is I am missing or not nesting the conditions correctly, but I am not sure. Any help is appreciated, or if there's a better or easier way to restrict the number of answered questions in the group I'm all ears.
Thank you!
(string-length(${rip_width_wide})=0 or string-length(${rip_width_moderate})=0 and string-length(${rip_width_narrow})=0 and string-length(${rip_width_very_narrow})=0) and (string-length(${rip_width_moderate})=0 or string-length(${rip_width_narrow})=0 and string-length(${rip_width_very_narrow})=0) and (string-length(${rip_width_narrow})=0 and string-length(${rip_width_very_narrow})=0) |
Solved! Go to Solution.
See the attached XLS. Basically, assign each question a point if it is answered, add up the points of the other 4 questions, and if the point total is < 2, display the question.
This worked perfectly. Thanks!