Jr:choice-name() not working for a select_one question within repeat group

1. What is the problem? Be very detailed.
I'm trying to calculate the label of selection from a select_one within a repeat group for using it in next question labels. But, it's not working.
2. What app or server are you using and on what device and operating system? Include version numbers.

3. What you have you tried to fix the problem?

4. What steps can we take to reproduce the problem?

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

Hi @Likhon

it's difficult to tell what's wrong with your form because you didn't attach it but here is a sample form I prepared some time ago which shows exactly what you need: choice_name_and_indexed-repeat.xls (7.5 KB)

Hi Grzesiek!

Thank you for your reply. I want the bame within same repeat group. Usually we use jr:choice-name(${ver}, '${ver}) for calculate the label. But, this syntax is not working in a repeat group.

Could you attach your form it would be easier? It might be the same problem Jr:choice-name doesn't give a value when called from inside a repeat group

I think so. Is there any solution? Here is the attachment
test.xlsx (12.6 KB)

Hi @Likhon

I checked the example you posted and I think some fields are mixed up.
I've made some corrections to it (see attached test_.xlsx (10.5 KB) ), in case other people can assist:

  • repeat_count (cell G4, referencing the number of hh members)
  • calculate (cell F6, referencing var q2)

FYI, it looks like this bug was fixed in the new release (ODK Collect v1.24 Beta). I haven't personally tested it yet, but you might want to give it a try.

I hope this helps!


1 Like

Hi andrea!
Sorry for my mistake. But, actually I tried as your correction. Maybe, this is for the bug. Thanks for the recommendation. Now, I will try it.