Repeats groups within repeat groups

Hello ODK Community,

I would like to understand whether it would be a good idea to use repeat
groups within repeat groups, the scenario is that there could be variable
number of people added and then for these people we can add different
number of household members (so technically this becomes a repeat within a
repeat i.e. people added through indexed-repeat then while looping over all
people there'd be a 2nd repeat at household level and on this same level
another repeat to ask questions about each HH member). It would be best if
it could be handled on the same form (as some constraints can be ensured
e.g. all people were added or not etc).

Can there be any data accessing problems/issues (as data might be
differently structured).

I would highly appreciate any ideas / workarounds to handle such cases.

Thank you,

Best,
Ayub

P.S: I have tried a small form (attached) and tried it on the android, it
seems to work fine.

repeat.xml (1.79 KB)

Writing constraints that work correctly on repeat groups is tricky.

They will often work correctly when you have just one repetition, but fail
and Force Close ODK Collect if you have two or more repetitions.

This is a form design and testing challenge. Search for current() and
"relative XPath" on our lists for information on writing these so that they
work.

Nested repeat groups work fine when exported via ODK Briefcase (you will
have 3 .csv files: for the form, the sub-form, and the sub-sub-form). You
then need to stitch these together to re-assemble your data set.

When using the publishers, there may be problems tying the various nested
records together. I think it is broken for one or both of Google Sheets
and Fusion tables. You should test to make sure you can tie the
sub-sub-records back to the appropriate sub-record and record.

··· On Mon, Nov 16, 2015 at 11:33 AM, Ayub wrote:

Hello ODK Community,

I would like to understand whether it would be a good idea to use repeat
groups within repeat groups, the scenario is that there could be variable
number of people added and then for these people we can add different
number of household members (so technically this becomes a repeat within a
repeat i.e. people added through indexed-repeat then while looping over all
people there'd be a 2nd repeat at household level and on this same level
another repeat to ask questions about each HH member). It would be best if
it could be handled on the same form (as some constraints can be ensured
e.g. all people were added or not etc).

Can there be any data accessing problems/issues (as data might be
differently structured).

I would highly appreciate any ideas / workarounds to handle such cases.

Thank you,

Best,
Ayub

P.S: I have tried a small form (attached) and tried it on the android, it
seems to work fine.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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 opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Mitch,

I tired with little extended version of the form but pulldata() stoppped
working in 2nd/nested repeat group (paths should have been relative i
guess). Is there any example form that I could look into which uses similar
concepts like relative XPath and current() that would be great help.

I've searched into ODK Community group, but couldn't find any specific
answers to it.

Thanks for the help!

These might be useful:

https://groups.google.com/forum/#!searchin/opendatakit/oldest$20youth/opendatakit/NIpaXpphD1w/eXuhwhleBgAJ

https://groups.google.com/forum/#!searchin/opendatakit/current()|sort:date/opendatakit/hSqzk0AN07Y/RqGn1akBBwAJ

https://groups.google.com/forum/#!searchin/opendatakit/current()|sort:date/opendatakit/kHYalQ4Z1X8/lej1zLwcJgAJ

https://groups.google.com/forum/#!searchin/opendatakit/previous$20repeat|sort:date/opendatakit/fX5AvkRbpAI/-5s1wxW7b0kJ

https://groups.google.com/forum/#!searchin/opendatakit/current()|sort:date/opendatakit/F5ZhjuO7_20/i92Ff8NQAAAJ

https://groups.google.com/forum/#!searchin/opendatakit/current()|sort:date/opendatakit/oRx1uXnd4RQ/jTkPZc29CwAJ

https://groups.google.com/forum/#!searchin/opendatakit/current()|sort:date/opendatakit/bM-rgxC9rEw/tYtvRW9NiM8J

And there is a known issue where "current()/." within a selection choice
filter references the enclosing group and not the field
presenting/selecting the list of choices.

··· On Tue, Nov 17, 2015 at 10:10 PM, Ayub wrote:

Mitch,

I tired with little extended version of the form but pulldata() stoppped
working in 2nd/nested repeat group (paths should have been relative i
guess). Is there any example form that I could look into which uses similar
concepts like relative XPath and current() that would be great help.

I've searched into ODK Community group, but couldn't find any specific
answers to it.

Thanks for the help!

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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 opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com