Problems with using repeat group to create a child case

Hi there,

In my application I have a form which is essentially a household listing. I
have set it up as a repeating group and based on answers within this repeat
group, I would like to create child cases for women and children under 5
that will then be measured in the Anthropometric module.

However I would like to save answers to questions in the repeat group as
properties for my case list (i.e household id, household members name, age
etc). I have done this before in previous applications but in this
application I keep getting an error message saying 'Inside the wrong
repeat'. What does this mean? (see attached screenshot)

Any assistance you can provide on this would be greatly appreciated.

cheers,
Jess

Hi Jessica,

If you have a form with 2 (or more) repeat groups I believe you would see
this error if you tried to save properties from questions in different
repeat groups to the same child case. Are all the questions you are trying
to save from the same repeat group?

Also, is the question that establishes whether or not the case should be
created (This woman is eligible for...) inside of the repeat group? If so I
think that could cause a problem. To clarify, as far as I know you can only
create cases from a repeat group in an all or nothing approach. That is,
you can't fill out a repeat group 5 times and have it create a case only 3
of the times. Though it is certainly possible I'm wrong about that. Does it
work if you remove the condition for creating a child case?

Jeremy

··· On Wed, Jan 6, 2016 at 7:58 PM, Jessica Hall wrote:

Hi there,

In my application I have a form which is essentially a household listing.
I have set it up as a repeating group and based on answers within this
repeat group, I would like to create child cases for women and children
under 5 that will then be measured in the Anthropometric module.

However I would like to save answers to questions in the repeat group as
properties for my case list (i.e household id, household members name, age
etc). I have done this before in previous applications but in this
application I keep getting an error message saying 'Inside the wrong
repeat'. What does this mean? (see attached screenshot)

Any assistance you can provide on this would be greatly appreciated.

cheers,
Jess

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

--
Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

Hi,

Maybe I didn't understood something, but I can't save any data from a
repeat group in a subcase. I have the same error shown in the picture from
Jessica Hall.
How exactly do we do that ?
I don't need to filter the values or anything. If I got 5 repeats, I want 5
subcases.

Thank for your advices.

Michel Akkaoui

··· Le jeudi 7 janvier 2016 04:32:04 UTC+1, Jeremy Wacksman a écrit : > > Hi Jessica, > > If you have a form with 2 (or more) repeat groups I believe you would see > this error if you tried to save properties from questions in different > repeat groups to the same child case. Are all the questions you are trying > to save from the same repeat group? > > Also, is the question that establishes whether or not the case should be > created (This woman is eligible for...) inside of the repeat group? If so I > think that could cause a problem. To clarify, as far as I know you can only > create cases from a repeat group in an all or nothing approach. That is, > you can't fill out a repeat group 5 times and have it create a case only 3 > of the times. Though it is certainly possible I'm wrong about that. Does it > work if you remove the condition for creating a child case? > > Jeremy > > > > > On Wed, Jan 6, 2016 at 7:58 PM, Jessica Hall <jhal...@gmail.com > wrote: > >> Hi there, >> >> In my application I have a form which is essentially a household listing. >> I have set it up as a repeating group and based on answers within this >> repeat group, I would like to create child cases for women and children >> under 5 that will then be measured in the Anthropometric module. >> >> However I would like to save answers to questions in the repeat group as >> properties for my case list (i.e household id, household members name, age >> etc). I have done this before in previous applications but in this >> application I keep getting an error message saying 'Inside the wrong >> repeat'. What does this mean? (see attached screenshot) >> >> Any assistance you can provide on this would be greatly appreciated. >> >> cheers, >> Jess >> >> -- >> 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. >> > > > > -- > Jeremy Wacksman > Dimagi , Inc. > >

Hello Michel,

Do you have more than one repeat group in your form? The most common source
of this error (possibly the only one) is if you try to save properties from
more than one repeat to a subcase. This can be tricky if you have similarly
named questions in both groups, so you will need to check the entire
reference including the repeat id when saving the field to the case.

Jeremy

··· On Tue, Jul 5, 2016 at 6:16 PM, Michel Akkaoui - de Sousa < akkaouim@gmail.com> wrote:

Hi,

Maybe I didn't understood something, but I can't save any data from a
repeat group in a subcase. I have the same error shown in the picture from
Jessica Hall.
How exactly do we do that ?
I don't need to filter the values or anything. If I got 5 repeats, I want
5 subcases.

Thank for your advices.

Michel Akkaoui

Le jeudi 7 janvier 2016 04:32:04 UTC+1, Jeremy Wacksman a écrit :

Hi Jessica,

If you have a form with 2 (or more) repeat groups I believe you would see
this error if you tried to save properties from questions in different
repeat groups to the same child case. Are all the questions you are trying
to save from the same repeat group?

Also, is the question that establishes whether or not the case should be
created (This woman is eligible for...) inside of the repeat group? If so I
think that could cause a problem. To clarify, as far as I know you can only
create cases from a repeat group in an all or nothing approach. That is,
you can't fill out a repeat group 5 times and have it create a case only 3
of the times. Though it is certainly possible I'm wrong about that. Does it
work if you remove the condition for creating a child case?

Jeremy

On Wed, Jan 6, 2016 at 7:58 PM, Jessica Hall jhal...@gmail.com wrote:

Hi there,

In my application I have a form which is essentially a household
listing. I have set it up as a repeating group and based on answers within
this repeat group, I would like to create child cases for women and
children under 5 that will then be measured in the Anthropometric module.

However I would like to save answers to questions in the repeat group as
properties for my case list (i.e household id, household members name, age
etc). I have done this before in previous applications but in this
application I keep getting an error message saying 'Inside the wrong
repeat'. What does this mean? (see attached screenshot)

Any assistance you can provide on this would be greatly appreciated.

cheers,
Jess

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

--
Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

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

--
Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

Hi Jeremy,

Thanks for your reply. I actually found how it works in the meantime. I did
a more thorough research in the forum and found the answer I was looking
for.
I have only one repeat group, but I wasn't configuring the case management
in the right way.

May I suggest to update this page from Confluence
: Child Cases - CommCare Public - CommCare Public
with the following text :

Other notes

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.
To do so, just include one of the parameters from your repeat groupe
(generally preceded by a '-') in the 'Case Property' name of the child
group.

Or to put it in the description page of the Repeat Groups
: Using Repeat Groups in the Form Builder - CommCare Public - CommCare Public

Thanks again for your help !

Michel

··· Le mercredi 6 juillet 2016 13:41:46 UTC+2, Jeremy Wacksman a écrit : > > Hello Michel, > > Do you have more than one repeat group in your form? The most common > source of this error (possibly the only one) is if you try to save > properties from more than one repeat to a subcase. This can be tricky if > you have similarly named questions in both groups, so you will need to > check the entire reference including the repeat id when saving the field to > the case. > > Jeremy > > On Tue, Jul 5, 2016 at 6:16 PM, Michel Akkaoui - de Sousa < akka...@gmail.com > wrote: > >> Hi, >> >> Maybe I didn't understood something, but I can't save any data from a >> repeat group in a subcase. I have the same error shown in the picture from >> Jessica Hall. >> How exactly do we do that ? >> I don't need to filter the values or anything. If I got 5 repeats, I want >> 5 subcases. >> >> Thank for your advices. >> >> Michel Akkaoui >> >> >> >> Le jeudi 7 janvier 2016 04:32:04 UTC+1, Jeremy Wacksman a écrit : >>> >>> Hi Jessica, >>> >>> If you have a form with 2 (or more) repeat groups I believe you would >>> see this error if you tried to save properties from questions in different >>> repeat groups to the same child case. Are all the questions you are trying >>> to save from the same repeat group? >>> >>> Also, is the question that establishes whether or not the case should be >>> created (This woman is eligible for...) inside of the repeat group? If so I >>> think that could cause a problem. To clarify, as far as I know you can only >>> create cases from a repeat group in an all or nothing approach. That is, >>> you can't fill out a repeat group 5 times and have it create a case only 3 >>> of the times. Though it is certainly possible I'm wrong about that. Does it >>> work if you remove the condition for creating a child case? >>> >>> Jeremy >>> >>> >>> >>> >>> On Wed, Jan 6, 2016 at 7:58 PM, Jessica Hall wrote: >>> >>>> Hi there, >>>> >>>> In my application I have a form which is essentially a household >>>> listing. I have set it up as a repeating group and based on answers within >>>> this repeat group, I would like to create child cases for women and >>>> children under 5 that will then be measured in the Anthropometric module. >>>> >>>> However I would like to save answers to questions in the repeat group >>>> as properties for my case list (i.e household id, household members name, >>>> age etc). I have done this before in previous applications but in this >>>> application I keep getting an error message saying 'Inside the wrong >>>> repeat'. What does this mean? (see attached screenshot) >>>> >>>> Any assistance you can provide on this would be greatly appreciated. >>>> >>>> cheers, >>>> Jess >>>> >>>> -- >>>> 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. >>>> >>> >>> >>> >>> -- >>> Jeremy Wacksman >>> Dimagi , Inc. >>> >>> -- >> 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. >> > > > > -- > Jeremy Wacksman > Dimagi , Inc. > >
1 Like

Thanks, Michel, we have updated the text of the Child Cases page. Glad it
worked out!

Jeremy

··· On Wed, Jul 6, 2016 at 8:08 AM, Michel Akkaoui - de Sousa < akkaouim@gmail.com> wrote:

Hi Jeremy,

Thanks for your reply. I actually found how it works in the meantime. I
did a more thorough research in the forum and found the answer I was
looking for.
I have only one repeat group, but I wasn't configuring the case management
in the right way.

May I suggest to update this page from Confluence :
Child Cases - CommCare Public - CommCare Public
with the following text :

Other notes

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.
To do so, just include one of the parameters from your repeat groupe
(generally preceded by a '-') in the 'Case Property' name of the child
group.

Or to put it in the description page of the Repeat Groups :
Using Repeat Groups in the Form Builder - CommCare Public - CommCare Public

Thanks again for your help !

Michel

Le mercredi 6 juillet 2016 13:41:46 UTC+2, Jeremy Wacksman a écrit :

Hello Michel,

Do you have more than one repeat group in your form? The most common
source of this error (possibly the only one) is if you try to save
properties from more than one repeat to a subcase. This can be tricky if
you have similarly named questions in both groups, so you will need to
check the entire reference including the repeat id when saving the field to
the case.

Jeremy

On Tue, Jul 5, 2016 at 6:16 PM, Michel Akkaoui - de Sousa < akka...@gmail.com> wrote:

Hi,

Maybe I didn't understood something, but I can't save any data from a
repeat group in a subcase. I have the same error shown in the picture from
Jessica Hall.
How exactly do we do that ?
I don't need to filter the values or anything. If I got 5 repeats, I
want 5 subcases.

Thank for your advices.

Michel Akkaoui

Le jeudi 7 janvier 2016 04:32:04 UTC+1, Jeremy Wacksman a écrit :

Hi Jessica,

If you have a form with 2 (or more) repeat groups I believe you would
see this error if you tried to save properties from questions in different
repeat groups to the same child case. Are all the questions you are trying
to save from the same repeat group?

Also, is the question that establishes whether or not the case should
be created (This woman is eligible for...) inside of the repeat group? If
so I think that could cause a problem. To clarify, as far as I know you can
only create cases from a repeat group in an all or nothing approach. That
is, you can't fill out a repeat group 5 times and have it create a case
only 3 of the times. Though it is certainly possible I'm wrong about that.
Does it work if you remove the condition for creating a child case?

Jeremy

On Wed, Jan 6, 2016 at 7:58 PM, Jessica Hall jhal...@gmail.com wrote:

Hi there,

In my application I have a form which is essentially a household
listing. I have set it up as a repeating group and based on answers within
this repeat group, I would like to create child cases for women and
children under 5 that will then be measured in the Anthropometric module.

However I would like to save answers to questions in the repeat group
as properties for my case list (i.e household id, household members name,
age etc). I have done this before in previous applications but in this
application I keep getting an error message saying 'Inside the wrong
repeat'. What does this mean? (see attached screenshot)

Any assistance you can provide on this would be greatly appreciated.

cheers,
Jess

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

--
Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

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

--
Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

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

--
Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.