Error when using begin_repeat function

I am trying to fill in my questionnaire on ODK but I get the error. The questionnaire is heavy and I need to use begin_repeat function so as to enable the form to upload, Please help to check where the error is. Attached is my questionnaire and error.

Sam.Push-pull.xlsx (49.6 KB)

Welcome back to the community @samwahito! Could you also please let us know on when you get this error message? I mean do you get this error message when you pull the questionnaire to your Collect android app or do you get this error when you try to submit your collection to the server from the Collect android app?

Hi @Kal_Lam , i receive the error when I reach at row 37 (module 5), when am pretesting the tool on my ODK Collect app.

1 Like

Hi @samwahito,
Could you please explain what you are calculating in row 37. Using “position(…)” function in this line is not correct because it should be within a repeat group to work.



1 Like

Hi @Ysr3322 ,
On row 37, i wanted it to be repeated for all the integer values input at row 19, i.e. if one indicates they have two plots of land, and then for each they have two subplots, i want to have cereals indicated for each suplot despite the plots it is in. Maybe I have used the wrong formula.

Hi @samwahito
You have a position(…) statement which can only be defined inside a repeat group

indexed-repeat(${Plot_Sub_plots}, ${group_Plots}, position(…))
What are you trying to achieve with this. As it is you can not call a position(…) when not inside a repeat group…

Kindly recheck your logic of how you want to execute this.


1 Like

Dear @Kal_Lam, @stephanealoo @Ysr3322 ,
Thank you all, I managed to solve the issue.


1 Like