Nested loop - repeated count

Hi Francesco,

This is possible, but XLSForm doesn't make it possible. We'll have to
work around it.

I've attached an example form that I think does what you'd like.
Ideally, you should have been able to use a repeat_count column with
the value ${participant_count}, but XLSForm doesn't allow it.

So instead, I've included a custom column in the XLSForm called
"body::jr:countx" with the value

In the XML that gets generated, you'll see this will appear at line 47 as

Replace the "countx" with "count"

The form should now do what you'd like.


nested_loop_count.xlsx (11 KB)

··· On Tue, Jan 17, 2017 at 7:53 PM, Gianfrancesco Ferrari wrote: > Hello, > > I would like to nest a loop within a loop, using repeated_count if this is > possible. That is, I have a number of thematic sessions that are taught in > various type of structures. For each session, I'm interested in a series of > information, the type of structure it was given, how long did it last etc. > So I would use repeat_count, and repeat the questions just mentioned for > every time that specific thematic session was given. I’m also interested to > know the number of participants for each thematic session. And for each > participant to that session, I would like to know the age, sex and the score > the participant obtained doing a test on that particular thematic session. > So I would like to reopen a repeat_count to enter the information about the > individual participants to that session or find a way to do so, but until > now I have failed. Would that be possible? Thank you > > > Kind regards > > > Francesco > > -- > -- > Post: > Unsubscribe: > Options: > > --- > You received this message because you are subscribed to the Google Groups > "ODK Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to > For more options, visit

Hello Yaw

I tried it but it didn't work

begin repeat rpt_length Capture Log Length
select_one length length Log Length* yes minimal search('s_length.csv')

begin repeat rpt_stock Capture Log Diameter /nested_loop_count/rpt_length/length
begin group grp_count Sawlog Count field-list
select_one diameter diameter Log Diameter* yes minimal search('s_diameter.csv')
end group grp_count

end repeat rpt_stock
end repeat rpt_length