Problem to select more than one option in question type ranking

How can I select the same answer more than once in the ranking questions?

Avoiding the message: Items cannot be selected more than once.

Thanks advance,

The Kobo ‘ranking’ question is basically a pre-determined series of select1’s, with explicit constraints to ensure you cannot select the same choice in more than one (hence effectively making you ‘rank’ the choices…). In XML it ends up looking like:

  <bind jr:constraintMsg="Items cannot be selected more than once" nodeset="/data/rank/_1st_choice" required="true()" type="select1"/>
  <bind constraint=" /data/rank/_2nd_choice  !=  /data/rank/_1st_choice " jr:constraintMsg="Items cannot be selected more than once" nodeset="/data/rank/_2nd_choice" required="true()" type="select1"/>
  <bind constraint=" /data/rank/_3rd_choice  !=  /data/rank/_1st_choice  and  /data/rank/_3rd_choice  !=  /data/rank/_2nd_choice " jr:constraintMsg="Items cannot be selected more than once" nodeset="/data/rank/_3rd_choice" 
...
  <select1 appearance="minimal" ref="/data/rank/_1st_choice">
    <label>1st choice</label>
    <item>
      <label>Item to be ranked</label>
      <value>item_to_be_ran</value>
    </item>
    <item>
      <label>Item to be ranked</label>
      <value>item_to_be_ran_1</value>
    </item>
    <item>
      <label>Item to be ranked</label>
      <value>item_to_be_ran_2</value>
    </item>
  </select1>
  <select1 appearance="minimal" ref="/data/rank/_2nd_choice">
    <label>2nd choice</label>
...

If you are technically inclined you can certainly manually edit the resulting XML and fiddle with these constraints to make them behave any way you wish, including being able to select the same choice more than once. But at least as exposed in the Kobo form builder, there isnt the ability to enable such behavior via the GUI.

It is probably worth noting here that the Kobo ‘ranking’ question is very different and quite unrelated to the ODK rank widget, although they serve a similar purpose (and the ODK rank question likewise does not permit duplicate selections).

1 Like