Error in choice filter during begin repeat

Hello ODKers,

I am facing an error "XPath evaluation: type mismatch This field is repeated". I have not faced this problem previously . I have a begin group inside a begin repeat . Begin repeat has no repeat_count . Data Collector can add as many forms as he wants. I am getting the error because it has choice_filter . Is there any way I can apply choice filter in begin repeat. I am attaching a sample file.
Testing_choice_filter.xlsx (9.5 KB)

Thanks and Regards,

You need to close your 'end group' statements. Under the name in the first 'end group' place 'Basic_details_Diagnostic' and under the 'name' for the second 'end group' place 'Manpower'.



From the error that you are getting, it is caused by choice filter as you stated.

The way you are calling varible in the repeat ie ${Services}, this is where the problem is.

You cant refer to a variable in a repeat without providing index, and that is where comes in the indexed-repeat() function.

You need to restructure the questions, and find a way of implementing the function.


Hello @dicksonsamwel,

I think we can't use choice_filter in repeat groups reason being the ambiguity for the choice_filter to choose which value to be considered. I tried using indexed-repeat() but that also throws the same error. I hope somebody might have a solution for this . Thanks for the reply.

Thanks and Regards,

Hello @Lloyd_Banwart,

Thank you for the reply ,but I don't think it is causing the problem nevertheless this has to be followed as standard so that we can know which group is ending where. I will try to follow that.

Thanks and Regards,

1 Like

Hello Gokul,

I am having the same error when using choice filters in repeats ....however when I use the form on computer( online form) it works. Only using the app on my smartphone the issue pops up...

Have you found a solution?


Could you attach your form? then we can try to find out what;s wrong.

1 Like

select_one_filter.xlsx (14.6 KB)

The problem is when you do a repeat with a choice filter . Again , it works ok for the Eketo/web form but when I open it with KOBO collect it show and error.

There is something wrong with your form and I can't convert it at all. Could you attach a working example?

I think there are a couple of issues going on here...

@Pablo_GC, Kobo Collect is an older version of ODK Collect with a different icon and name. If you'd like us to help, please switch to the latest version of ODK Collect so we can be sure what you are running.

@Grzesiek2010, I think the issue you are running into is that the form works with pyxform or XLSForm Offline, but doesn't work with XLSForm Online. I'm not sure what the issue is, but I've filed it at

Just wanted to follow up and say the issue with the form not working with XLSForm Online is now fixed.