Dear ODK friends,
1. What is the problem? Be very detailed.
I want to access responses in repeat group and a repeat inside repeat group. I have a scenario that there are main types of work (main repeat group) under which other work types come (nested repeat), and by accessing those responses (main work and sub-work) I want to ask another related questions in another nested repeat group. I tried the attached part of my long questionnaire.
Your help is sincerely regarded.Nested indexed-repeat.xlsx (10.4 KB)
5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
Yes, please find the attached sample form.
Kind regards,
Raj
Hi,
What is the challenge you are experiencing? nested repeat group should work without and issue. Happy to help if you explain in a little more detail.
Thanks,
Imran
Hi @A.N.M_AL-IMRAN
Thanks for your interest.
I tried the attached xlsx form in Kobo, first-level nested indexed-repeat works fine when accessing the first-level repeat group question-response, but in the case of using indexed-repeat inside repeat group to access response from nested repeat group that matches the position(..), does not produce the desired result. Kind request to look at the attached the questionnaire which is an important part of my survey.
Hope, I am able to make it more clearer.
Thanks, Raj
Could anyone help me, please! Thanks.
Hello @Raj_Pravat,
It's hard to understand the expected end result in your form espeacially without the repeat_count
values.
Assuming all repeats iterate the same amount of times
, then I would say the error is in how you point position()
of the second repeat
i.e.: indexed-repeat(${work_title}, ${second_repeat}, ${title_count}, ${top_repeat}, ${work_count})
${title_count} and ${work_count} are values in another set of repeat
which you can only access via indexed-repeat()
again, my suggestion would be to replace the ${title_count}
with position(..)
and ${work_count} with position(../..)
I did not try the suggestion, by they might solve your issue
Best regards,
Jules R
1 Like
Hello @jules_rugwiro
Sorry for delayed response!
Thanks a lot for your possible solution. I changed my form accordingly with your suggestion, and tried it worked well in ODK App, but not in KOBO enketo form. Can there be a solution suited to both Enketo (@martijnr) and ODK App? I am asking my query in Kobo community also.
Thanks and best regards,
Raj Pravat
Hello,
How can this purpose be achieved together with ODK Collect and Enketo? If anybody has ideas, please help me.
Stay safe and healthy!
Raj