Selecting all the choices

What is the problem? Please be detailed.
I am having a problem in selecting all the multiple choices derived after filtering it, I want to select all the multiple choices or make it required. If either one of the choices will not be selected then it shouldn't proceed to the next question.

What ODK tool and version are you using? And on what device and operating system version?
I am using ODK Collect version v1.18.2

What steps can we take to reproduce the problem?
What sort of constraint or methods should be taken to solve it? Is it possible to do or not?

What you have you tried to fix the problem?
I have used several codes like (selected(., '1') and selected(., '2') and selected(., '3') and selected(., '4') and selected(., '5') and selected(., '6') in constraint field but as the choices will appear after the filter so it is not working as the choices might be less than 6 and the choices may be changing each time due to the filter function. But what should be used for the filtered multiple choices, so that none of the choices will be missed??

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.)

You can use count-selected(.)=6 in constraint, if you have 6 options.

Thank you but it can be changed due to filter so out of 6 it may reduce so dat function wont allow to proceed next because if we will have four selected after filter than it won't work.

You can directly refer to the variable for which value the filter is working. For example, if the filter is related to hhmembercount variable, you can specify: count-selected(.)=${hhmembercount}. You can try using nested if condition as well. If you can give me some more details, I can try to be more helpful.

1 Like

Thank you so much for the prompt reply, I will try the one you have suggested me and will let you know or will send you the file.

1 Like