I have been reading the Kobo ccommunity and it is very helpful. However, I could not find a possible solution for my issue. Attached, please find the sample XLSForm I am working on.
I managed to make indexed-repeat work for a numerical variable, however, what I would like to show is not the numerical code but the label of the numerical code.
Thank you, walroos and Kal_Man.
The indexed-repeat works fine except that it takes the numeric code (of crop) as output. However, what I wanted to output is the label (of crop code).
Below code works fine:
I finally got it! The issue was that jr:choice-name() cannot be combined with indexed repeat. I added a new calculate step for jr:choice-name() in the first repeat which will be called in the indexed repeat code in the second repeat.
Attached, the code for those who might be looking for answers.