Set up a rank question in an XLSForm

rank-question
xlsform
#1

Hey all,

I’m trying to figure out how to set up a rank question and I can’t find very much information on ODK’s documentation or anywhere else. I understand how to create rank questions but I don’t understand how to set the number of choices for the user to make.

For example, if I have eight options and I want the user to select their first, second, and third choices, how do I set that up?

#2

Hi
Would you be interested in doing this using the form builder? This article would definitely be able to guide you.

Regards
Stephane

1 Like
#3

That’s been Plan B today, I can certainly do it that way, I was just wondering if it would be possible to do it in the XLSForm instead. If it’s not possible, that’s okay, it’s not too much of a hassle to just do those questions in the form builder. Thanks for the response!

1 Like
#4

If anyone in the future is curious, I did end up figuring it out by creating a rank question in the survey and then exporting it in XLSForm format.

It turns out that “rank” questions are actually a group of “select_one” questions with the “appearance” attribute set to “minimal,” and the “constraint” attribute set up so that no answer from any question in the group can match its own answer (ex: ${first_choice} != ${second_choice} and ${first_choice} != ${third_choice}).

1 Like