Parent/Child Relationships-Closing child cases when a parent case is closed

71 views
Skip to first unread message

Chaiwa Berian

unread,
Mar 24, 2015, 9:24:26 AM3/24/15
to commcar...@googlegroups.com
Esteemed CommCare users,

I need your help here.. i have successfully built a form that registers a parent case(caregiver) and, based on whether caregiver has a child, child case(s). Child cases get opened into another module which is what i want, but the challenge i have is when i close the parent case! 

Is there a way i can configure the form or edit XML of the form to embed the logic for closing all child cases belonging to a parent case when parent is closed? I don't want to use filters to hide the child cases based on some value, but to actually close them! Surely this should be possible...anybody to help??

Thanks,
Chaiwa.

Sheel Shah

unread,
Mar 24, 2015, 12:00:28 PM3/24/15
to commcar...@googlegroups.com
Hi Chaiwa,

Unfortunately this isn't possible currently on CommCareHQ (but definitely something we want to make possible long term).  We have Uservoice ticket tracking the issue (http://dimagi.uservoice.com/forums/194738-app-builder/suggestions/5431942-provide-option-to-close-sub-cases-when-closing-a-c).  

For now, an alternate option would be to use CommCareHQ's close case functionality (when you select a case you can close it, or you can close cases using the Excel bulk importer) to get around this issue.    Let me know if that will work for you.

Thanks,
Sheel

--
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.



--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah


Chaiwa Berian

unread,
Mar 25, 2015, 6:40:40 AM3/25/15
to commcar...@googlegroups.com
Thanks Sheel for the prompt response. 

Since this is not possible yet, is there a way i can close child cases simply by passing the case id of the parent to a CommCare function that handles case closing, even if it is advanced feature? Is such a function accessible by us(commcare-users), in any way? Because what i don't want is to leave it up to the users to close the child cases when the parent case is closed! i would like to programmatically/configuratively close child cases when their respective parent case is closed as is the app requirement.

Thanks,
Chaiwa.

--
You received this message because you are subscribed to a topic in the Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commcare-users/jkXIAW5FT34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.

Sheel Shah

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

You can use the CommCareHQ APIs to close a case problematically but that would require building an external system that would interact with ours.  There isn't a function on the phone directly.   I'll send you a direct email to discuss some more technical options. 

Sheel

Chaiwa Berian

unread,
Mar 29, 2015, 5:45:05 AM3/29/15
to commcar...@googlegroups.com
Hi Sheel,

I am still waiting for your guidance on the technical options you earlier mentioned.

Thanks,
Chaiwa.

Sheel Shah

unread,
Mar 30, 2015, 11:24:00 AM3/30/15
to commcar...@googlegroups.com
Hi Chaiwa,

Sorry, I was unclear about your last email. I'll respond today. 

Sheel

--
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.
Reply all
Reply to author
Forward
0 new messages