Counting the number of choices available (not those which are selected as an answer)


(My question below is possibly similar to this question)

The select_one and select_multiple question types allow the list of available options to be generated dynamically via lookup, for example using the search() function in the appearance field. This means that, potentially, the list of options is empty. In this case, the question should be skipped.

Is there a function (or some means) of counting the number of items in a select_one or select_multiple question? Note that I wish to count the options available for selection in a question - NOT the options selected in the answer.

If so, I assume that skip logic could be used to then skip a select question which does not have any options to select.

Thank you

Can you please write out the XLSForm row you are using to generate your available options. There is no range() appearance that I am aware of. Do you perhaps mean search()?

Thanks Hélène,

You are right, and I apologise for my clumsy mistake: I did mean the search() function (and I have corrected my original post).

The line is:

Do you know of any means or trick to test if the search function yields no options?