Next question: How can I restrict the number of choices in a multiple_choices field to for example three? I found that this count-selected(.)<=3. (found it here: https://www.datawinners.com/find-answers-app/xlsform-how-can-i-restrict-the-number-of-selected-answer-for-a-multiple-cho…)
should work but it does not for me. I also tried count-selected<=3 (without the dots), but also that does not work. Andy ideas?
Should that be in the relevant field or in the constraints?
Sorry, that didn't show up in time before I posted my answer...
Hi Nicole,
it depends on what you want. The relevant expression is useful on a Note to give the user a warning. If you want to truly stop the user from submitting a Form that breaks your rule, then add a constraint in the multiple-choice itself. I added both examples so you could see the options.
Ismael
Hm, that also does not work 😞
Should it give already the constraint_message when clicking the forth option or only when the data is validated?
To close this thread.
The constraint syntax above is correct, but the expression is not executing in your case because your question is operating within a repeat. This issue is in our backlog at the moment (constraints do not work when within a repeat).
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.