Use select_mutiple for Restrict Choose

Hello.
I will need help on the possibility of doing a partial select_multiple.
I am currently working on designing my question about KoBo collect. This is a multiple choice question (10 Choices). However, among the 10 we can only make 3 choices.
In my xlsfrom file, I repeated the question 3 times using select_one and mentioning in the "constrained" column for the second line not (. = $ {Bes}) and third line not (. = $ {Bes1}) to limit to 3 choices.

I want to use select_mutliple and constrained has 3 choices. Any contribution will be welcome

Cordially

have you tried:?

constraint='count-selected(${multichoicequestion})<=3'

See here.

  • Gareth

... opps, it looks like count-selected() has been mis-documented:

"...Returns the number of items in a space-separated list"

It doesn't actually take a string, but rather a node. [not looking at anybody in particular, HL... :wink:]

@Xiphware can you please send in a PR to https://github.com/opendatakit/xforms-spec? Be the change you want to see in the XForms spec!