# Retrieving answers from a repeat group and using them to create multiple-choice lists for two levels of questions

**URL:** <https://forum.getodk.org/t/retrieving-answers-from-a-repeat-group-and-using-them-to-create-multiple-choice-lists-for-two-levels-of-questions/42454>\
**Category:** Support\
**Tags:** odk-xlsform\
**Created:** [August 1, 2023, 4:24am UTC](https://forum.getodk.org/t/retrieving-answers-from-a-repeat-group-and-using-them-to-create-multiple-choice-lists-for-two-levels-of-questions/42454 "2023-08-01T04:24:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 10, 2023, 5:52pm UTC](https://forum.getodk.org/t/retrieving-answers-from-a-repeat-group-and-using-them-to-create-multiple-choice-lists-for-two-levels-of-questions/42454/2 "2023-08-10T17:52:44Z")

</div>

Hi @Andres_E  
Welcome to the ODK forum. We're glad you're here. When you get a chance, please [introduce yourself on this forum thread](https://forum.getodk.org/t/-/6671). I'd also encourage you to add a picture as your avatar because it helps build community!

for nested repeats your `indexed-repeat` function should be like this:  
`indexed-repeat(${name_parcela}, ${repeat3}, 1, ${repeat2}, position(..))`  
you need to define not only the number of the inner but also the number of the outer group.

The form would be like:  
[trial.xlsx](https://forum.getodk.org/uploads/short-url/kM2oOnvOGbmBjMejvRFMSYldMbh.xlsx) (11.2 KB)

It works well in ODK Collect (you only need to remove the `field-list` appearance from groups that contain repeats because it's not supported) however in Enketo it doesn't work and the value from the first group is always displayed. @Sadiq_Khoja or @eyelidlessness maybe you are aware of this issue if it's reported or not at least?

---

_[View the full topic](https://forum.getodk.org/t/retrieving-answers-from-a-repeat-group-and-using-them-to-create-multiple-choice-lists-for-two-levels-of-questions/42454)._
