Error of indexed-repeat() while using group repeat within group repeat

Hi Community,
I have created a diet form in xls format which contains repeated groups within repeated group
I have got a problem with sub group repeat. it showing an error that you may need to use the indexed-repeat() function to specify which value you want. the problem resolves when i added field-list to sub group. but sub group contains choice filter and follow up questions. so i definitely need to remove field-list. please help me where i need to indexed-repeat() to resolve error and to make form works as per requirement. i have attached diet form below. please help me. Thanks in Advance.

dietsam.xlsx (28.0 KB)

Hello,

I believe there was a simpler way of achieving the same goal. First of all, the indexed-repeat() is used to retrieve information of a variable on Nth position from another repeat and is usually constructed as below
indexed-repeat(a,b,c) where:
a: is the variable that holds the value to be returned
b: is the repeat that holds the variable
c: is the position of the nth of the repeat you want to access (e.g.: the second or third or fourth iteration)

looking at yours, there was many arguments (
indexed-repeat(
${EM_name}, arg 1
${EM}, arg 2
position(..), arg 3
${EM}, arg 4
${EM_position} arg 5
)
this may work "indexed-repeat(${EM_name}, ${EM}, position(${EM})" however, you could have got the same result if not better by using a combination of select_multiple and repeat which will even help you control the max and minimum repetitions and more.

We can build it together if you are interested.

Best, Jules R

2 Likes

Thank you very much Jules for Helping me out.
The Error has resolved . As per your suggestion I have used combination of select_multiple and relevance to food each category type instead of choice filter. this also reduced time for form filling
choice filter. the repetition is working very fine unlimited of times.
form is completed as of now. Glad you offered to join us , I definitely reach you in future if any issues raises.

2 Likes