Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To enable this feature, proceed to the Application Settings by selecting the gear in the top left hand corner next to the application name. Then select the Add-On tab. Once on the Add-On tab, select the menu option on the right (three stacked lines) and check the Case Management box. Child cases will appear as an option in this section.

Table of Contents
stylenone

Multiexcerpt include macro
macro_uuid77a79df7-a5d1-4f8f-828d-6c8d8a40e9b2
nameSoftware Plan - Pro
templateDataeJyLjgUAARUAuQ==
page[Internal] CommCare Public ManagementCommCare Help Site Design Guidance
addpanelfalse

Example Use of Child Cases

...

  1. On CommCare HQ, go into your desired application. Click on the form in which you are registering your subcase/ related case.

  2. Select the “case management” tab. On the bottom of the case management tab, you will see the heading “Child Cases””. Select the plus (+) sign to open the secondary case you want that is linked to the “main” case. For example, if the child case were a baby, select the module in which the case type is "baby." 

  3. If desired, you can add a question that serves as the condition to open the child case (i.e. Only if the answer to <question> is <answer>). 

  4. Select the questions/data points that you want to also be associated to the child case. At a minimum you must specify a question that serves as the name of the new case.

  5. Save your changes and try it out!

...

Opening Child Cases from a Repeat

...

Groups

It is possible to open a child case from questions that are in a repeat group Repeat Groups . This is useful if you want to be able to open multiple child cases of one type - for example if you want to be able to conduct a survey and register a case for every household member.

...

Accessing Parent Case Properties

...

The application builder gives Child cases the ability to access and update properties of the parent case.

...

Note that this only works one-way: the child can access/update its parent case's properties, but the parent case CANNOT access or update properties of its child cases. This one-way relationship can be seen when syncing cases to a device as well. A child case synced to a device will bring the parent with it.  A parent case synced to a device does not guarantee that the child cases will also be there.

See the page Linking Parent and Child Case Data in the Understanding Data in CommCare section https://dimagi.atlassian.net/wiki/spaces/commcarepublic/pages/2143956156/Case+Data+Export#Linking-Parent-and-Child-Case-Data.

[Advanced] Linking Parent and Child Case Data 

Panel
panelIconIdatlassian-info
panelIcon:info:
bgColor#FFFAE6#EAE6FF

Warning

These calculations are advanced, and require complex expressions.

...