Using Repeat Group with a parent Form to create child cases

1,260 views
Skip to first unread message

Chaiwa Berian

unread,
Mar 5, 2015, 10:18:38 AM3/5/15
to commcar...@googlegroups.com
Hello there,

Does anyone know how i can accomplish this? I need to register a woman using one form, and then at the end i ask if woman has got children.

If answer is yes then i run questions within a repeat group to collect details related to this child, and it has to repeat until the user chooses to end (i.e. until there are no more children to be registered for that particular woman). 

Also i would like to have children registered under this repeat group be treated as individual cases which can be tracked under a different module, and that they should be treated as child cases of their mother case(parent)-related to their mother in way that makes it easier for the user to pick a mother and then show all children under that particular mother. 

This might too much, but if someone can just highlight key tips to lookout for, will be highly appreciated!

Thanks,
Chaiwa.

Amelia Sagoff

unread,
Mar 5, 2015, 6:45:55 PM3/5/15
to commcar...@googlegroups.com
Hi Chaiwa,

Yes, you can do this! Simple name the child case after a property in the repeat group..


"It is possible to open a child case from questions that are in a repeat group. Note that you will not be able to use the questions in the repeat group to update the parent case, only for the child case. This is useful if you want to be able to open multiple child cases of one type."

I hope this helps!
Amelia



--
You received this message because you are subscribed to the Google Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chaiwa Berian

unread,
Mar 10, 2015, 8:21:48 AM3/10/15
to commcar...@googlegroups.com
Hi Amelia,

Thanks for the helpful and useful explanation and links. I tried to setup the forms following ideas on the help site but i seem to have missed it somewhere! What is happening is that, i am able to register the caregiver(mother) and then a repeat group question to add new child comes up. When i agree to adding a new child, i can beautifully register the first child and at the end if asked  to add another and i say no, then the child case is created separate from the parent case. Beautiful! 

But the problem is after registering the first child and if i say yes to adding more children, the app reports an error. The error is "uv uv unhandled exception in gui-cip => java.lang.illegalArgumentException[null]". What could be the possible cause of this error? I expect the app to repeat creating child cases but it fails on the second child! That is, it works fine if i just register one child, but if more than one it fails!

Kind regards,
Chaiwa.

Nate Haduch

unread,
Mar 10, 2015, 10:47:10 AM3/10/15
to commcar...@googlegroups.com
Hi Chaiwa,

I'd like to take a closer look at this error as it sounds like this may be a bug. I'll follow up with you on a new thread, but I'll post back to this thread with our conclusions.

Cheers,

Nate
--
Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139
web: http://www.dimagi.com/

Nate Haduch

unread,
Mar 19, 2015, 9:57:22 AM3/19/15
to commcar...@googlegroups.com
Hi CommCare-Users,

We were able to find the source of this issue for this case, which is a display issue for repeat groups for certain J2ME phones. We have made a fix for this case for CommCare ODK 2.20, but a workaround may be available in the meantime for anyone who is encountering difficulties with repeat groups on Java phones.

Thanks,

-- 
Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139
web: http://www.dimagi.com/

Reply all
Reply to author
Forward
0 new messages