I have created a survey on Ona and everything works on the webform, with no errors or invalid response feedback. It works perfectly.
However, when I tried to test it on the ODK collect app, my ranking question keeps on providing me with an error and since it is a required question it wont allow me to continue with the survey either.
The error it states is : "each ranking can only be used once" and it is what I want it to state if more than one ranking is selected twice. But I selected each ranking only once and still get this response. Why does this happen on ODK Collect when it works perfectly on the Ona webform and how do I fix it?
I realize you are noticing the issue in ODK Collect. But the formbuilder in Ona is not part of the ODK ecosystem. So if you are building a form with that and the result isn't working. Then you need to consult them.
Your prompt is to "rank countries" but your list is not a list of countries.
The constraint message is inconsistent when testing. Sometimes is works and sometimes it doesn't. I was able to complete the question a number of times. I think it has to do with when the constraint is calculated, the order in which the questions were answered, and whether an answer is changed. But I'm not sure.
Using integer questions seemed to work consistently for me, but I didn't test it extensively.
+--------------+--------------+---------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------+------------------------------------+
| type | name | label | appearance | constraint | required | constraint_message::English |
+--------------+--------------+---------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------+------------------------------------+
| begin group | rank_markets | 1.9.2 | field-list | | | |
| integer | Q1a | Africa | | . > 0 and . < 10 and . != ${Q1b} and . != ${Q1c} and . != ${Q1d} and . != ${Q1e} and . != ${Q1f} and . != ${Q1g} and . != ${Q1h} and . != ${Q1i} | yes | Each ranking can only be used once |
| integer | Q1b | Australia | | . > 0 and . < 10 and . != ${Q1a} and . != ${Q1c} and . != ${Q1d} and . != ${Q1e} and . != ${Q1f} and . != ${Q1g} and . != ${Q1h} and . != ${Q1i} | yes | Each ranking can only be used once |
| integer | Q1c | China | | . > 0 and . < 10 and . != ${Q1a} and . != ${Q1b} and . != ${Q1d} and . != ${Q1e} and . != ${Q1f} and . != ${Q1g} and . != ${Q1h} and . != ${Q1i} | yes | Each ranking can only be used once |
| integer | Q1d | Europe | | . > 0 and . < 10 and . != ${Q1a} and . != ${Q1b} and . != ${Q1c} and . != ${Q1e} and . != ${Q1f} and . != ${Q1g} and . != ${Q1h} and . != ${Q1i} | yes | Each ranking can only be used once |
| integer | Q1e | Far East | | . > 0 and . < 10 and . != ${Q1a} and . != ${Q1b} and . != ${Q1c} and . != ${Q1d} and . != ${Q1f} and . != ${Q1g} and . != ${Q1h} and . != ${Q1i} | yes | Each ranking can only be used once |
| integer | Q1f | India | | . > 0 and . < 10 and . != ${Q1a} and . != ${Q1b} and . != ${Q1c} and . != ${Q1d} and . != ${Q1e} and . != ${Q1g} and . != ${Q1h} and . != ${Q1i} | yes | Each ranking can only be used once |
| integer | Q1g | Middle East | | . > 0 and . < 10 and . != ${Q1a} and . != ${Q1b} and . != ${Q1c} and . != ${Q1d} and . != ${Q1e} and . != ${Q1f} and . != ${Q1h} and . != ${Q1i} | yes | Each ranking can only be used once |
| integer | Q1h | North America | | . > 0 and . < 10 and . != ${Q1a} and . != ${Q1b} and . != ${Q1c} and . != ${Q1d} and . != ${Q1e} and . != ${Q1f} and . != ${Q1g} and . != ${Q1i} | yes | Each ranking can only be used once |
| integer | Q1i | South America | | . > 0 and . < 10 and . != ${Q1a} and . != ${Q1b} and . != ${Q1c} and . != ${Q1d} and . != ${Q1e} and . != ${Q1f} and . != ${Q1g} and . != ${Q1h} | yes | Each ranking can only be used once |
| end group | | | | | | |
+--------------+--------------+---------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------+----------+------------------------------------+
I downloaded you xls file and converted using http://opendatakit.org/xiframe/ and it works well in Collect. Do you use this converter too? if not please try, the only thing you need to change is removing spaces from your xls file.
@Grzesiek2010, I had tested with KoBo because it was convenient. After seeing your message I converted using that link instead and tested, and I ran into the same issues. It doesn't work always as expected.
Got it and I also noticed that when I get the warning (but answers are ok) the problem is solved after changing a device orientation. Looks like a bug in Collect or Javarosa. I'll take a look at it.
As a workaround, for now, I suggest changing your device orientation or for example, opening the navigation view (FormHierarchyActivity) -if you are sure your answers are ok but you can't navigate forward. Then all answers are saved and validated properly.
Thanks for reporting. it's very important and we appreciate it. Collect is huge and it's only a part of ODK so it's not possible to catch everything and that bug is a good example.