The two solutions given are good but do not work on Kobocollect and Enketo when trying to add more than 2 instances of the repeat group. If you add 3 instances of the repeat group and try to send the form it throws an error. The error comes from the constraint being checked twice (once when the values are entered and once when the form has to be sent). The first time the constraint is met while the second time is not. How do I overcome this problem?
The two solutions given are good but do not work on Kobocollect and Enketo when trying to add more than 2 instances of the repeat group. If you add 3 instances of the repeat group and try to send the form it throws an error.
*Your environment, why you think this might be happening.
I think that the error comes from the constraint being checked twice (once when the values are entered and once when the form has to be sent). The first time the constraint is met while the second time is not. How do I overcome this problem? Is this a bug?
@andrea_ageon, I just checked this at my end and it works perfectly as expected both in Enketo and Collect android app. The main objective of this workaround is to restrict the same entry twice in a repeat group. Please check XLSForm I shared here:
have you tried to add more than 2 repeat groups? If you try to add at least three groups (for example selecting once “One”, once “Two”, once “Three”) you should be able to replicate the error. Thanks!
OK, I got it. So when you are with Enketo, and you have a repeat group of more than 3, the issue starts popping up. Similarly, when you are Collect android app and you have a repeat group of more than 4, the issue starts popping up.
Please note that this is not a system bug. It’s the limitation of the syntax. Maybe the community could help build from this point to overcome the limitation.
Thank you once again for flagging this in the community.
I have tried applying the same concept in my form but if I change the response it does not take off the error message. In the below image, I tried selecting visit 3A and then when the error message showed up, I changed the option to Visit 3B, However, the error message does not disappear.
Can you please have a look at the form and let me know how to rectify this.
sir what i had wanted was that if the option ‘One’ is selected, it should not show in subsequent repeats
e.g in first repeat if “One” is selected, second repeat should only display all other options except the option “One” which was selected
if “Two” is also selected in second repeat, both options “One” and “Two” should not display in subsequent repeats,
the repeat should continue until the all options are selected, then repeat ends at last option selected
Hi, This example from Josh would be perfect if I can get it to work.
The example as it stands does not remove a selected option after a few (I think 3) repeats. I made the select_one options list longer in the attached example and have modified the example a bit. It seems to be working now, but if i make the select_one required i cannot save it it seems to be ‘removing’ the second answer and i cannot continue.
It would be great if i could get this to work as it solves many enumerator problems.
I’m also having the same issue. If I add more than 10 options, when the user comes to the 10th item, it gets repeated values for those that are remaining (or the former selection are not fixed). How should I approach this issue? Is this related to the calculation field of C2?
Hi @vick25 and @rrmaximiliano, thank you for flagging this. You can just use letters instead of numbers for the choice names (the formula as I wrote it only works on single letter-length choice names):
Hope you are doing well. My name is Rony, and, first, my apologies for sending this email impromptu, but I found one of your solutions while searching for a question about restricting choices already selected from a repeat group on KoboToolbox. And I was wondering if you happen to have another solution for that problem when you have more than 10 choices.
A bit of background, we are implementing a program in Ukraine for students that need tutoring classes, and the tutors need to provide feedback. In some cases, the group of students consists of 10+ kids, and when I implemented your solution in the link above it seems that I am not able to make it fully functional after the 10th kid. So, for example, the 11th and 12th kids are not removed when I get to the 13th kid.
Thank you very much in advance, and regardless of your message, I appreciate the solutions you have posted overall in the kobo forum.
Rony Rodrigo Maximiliano Rodríguez-Ramírez