Problems getting off the ground with 'repeat groups'

hi everyone,

this is probably a really rookie question, but i'm having trouble getting
'repeat groups' working.

basically, i'm trying to do a household survey in the course of which i ask
the respondent if other people live with him/her. assuming there are others
living in the household, i want to start a repeat group in which i ask each
individual's gender, age, and then a series of questions about education
and/or employment. there is also a lot of display logic within this as
well.

the repeat count is supposed to be set to the number of other HH members.
the first question within the repeat group is the name of an individual,
and then i've tried to program all subsequent questions in that to use that
person's name.

i'm sure there are other issues with my attempt, but the first error
message that comes up when i try to test in cloudcare (while trying to kick
off the repeat group) is the following:
internal error handling request: <type
'org.javarosa.xpath.XPathTypeMismatchException'>:
org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type
mismatch Location /data/HHmembername was not found

i've attached the exported form in excel. (it's just meant to be a test so
the actual content is cursory/a little nonsensical in places).

thanks so much, in advance, to any one who takes the time to help me out.

oops, now with attachment.

Export test repeat group problem.xlsx (42 KB)

··· On Wednesday, May 21, 2014 8:52:43 PM UTC+1, mo...@cmapping.net wrote: > > hi everyone, > > this is probably a really rookie question, but i'm having trouble getting > 'repeat groups' working. > > basically, i'm trying to do a household survey in the course of which i > ask the respondent if other people live with him/her. assuming there are > others living in the household, i want to start a repeat group in which i > ask each individual's gender, age, and then a series of questions about > education and/or employment. there is also a lot of display logic within > this as well. > > the repeat count is supposed to be set to the number of other HH members. > the first question within the repeat group is the name of an individual, > and then i've tried to program all subsequent questions in that to use that > person's name. > > i'm sure there are other issues with my attempt, but the first error > message that comes up when i try to test in cloudcare (while trying to kick > off the repeat group) is the following: > internal error handling request: 'org.javarosa.xpath.XPathTypeMismatchException'>: > org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type > mismatch Location /data/HHmembername was not found > > i've attached the exported form in excel. (it's just meant to be a test so > the actual content is cursory/a little nonsensical in places). > > thanks so much, in advance, to any one who takes the time to help me out. >

Hi,

Thanks for reaching out to us. The problem is because you are using the
wrong reference to the HHmembername. When you reference a question, you
have to use the full "path" to that question (kind of like a filepath to
reference the location of a file on your computer). Every question is
inside on big group called "data" so that's why you see /data/ in front of
your question ids when you reference them in logic.

However, if you make other groups in your form (like a repeat group), you
also have to include the name of that group in the reference to that
question. E.g. if I had question "question1" inside group "group1", the
full path would be /data/group1/question1.

In your form, you have a repeat group called "question3" (you might want to
consider renaming it!). So the full path to the question with the id
HHmembername is /data/question3/HHmembername.

If you use the drag & drop functionality in our logic expression editor,
you can see the full path to any question you drop in. I recommend using
this always when you're doing logic (or to double check output values).
Drag & drop for output values is something we're hoping to work on soon!

I hope that helped, and good luck with exploring repeats!

Thanks,
Amelia

··· On Wed, May 21, 2014 at 3:55 PM, wrote:

oops, now with attachment.

On Wednesday, May 21, 2014 8:52:43 PM UTC+1, mo...@cmapping.net wrote:

hi everyone,

this is probably a really rookie question, but i'm having trouble getting
'repeat groups' working.

basically, i'm trying to do a household survey in the course of which i
ask the respondent if other people live with him/her. assuming there are
others living in the household, i want to start a repeat group in which i
ask each individual's gender, age, and then a series of questions about
education and/or employment. there is also a lot of display logic within
this as well.

the repeat count is supposed to be set to the number of other HH members.
the first question within the repeat group is the name of an individual,
and then i've tried to program all subsequent questions in that to use that
person's name.

i'm sure there are other issues with my attempt, but the first error
message that comes up when i try to test in cloudcare (while trying to kick
off the repeat group) is the following:
internal error handling request: <type 'org.javarosa.xpath.XPathTypeMismatchException'>:
org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type
mismatch Location /data/HHmembername was not found

i've attached the exported form in excel. (it's just meant to be a test
so the actual content is cursory/a little nonsensical in places).

thanks so much, in advance, to any one who takes the time to help me out.

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

thanks so much, amelia! you saved me hours mucking about on my own, trying
to figure it out.

··· On Wednesday, May 21, 2014 9:56:20 PM UTC+1, Amelia Sagoff wrote: > > Hi, > > Thanks for reaching out to us. The problem is because you are using the > wrong reference to the HHmembername. When you reference a question, you > have to use the full "path" to that question (kind of like a filepath to > reference the location of a file on your computer). Every question is > inside on big group called "data" so that's why you see /data/ in front of > your question ids when you reference them in logic. > > However, if you make other groups in your form (like a repeat group), you > also have to include the name of that group in the reference to that > question. E.g. if I had question "question1" inside group "group1", the > full path would be /data/group1/question1. > > In your form, you have a repeat group called "question3" (you might want > to consider renaming it!). So the full path to the question with the id > HHmembername is /data/question3/HHmembername. > > If you use the drag & drop functionality in our logic expression editor, > you can see the full path to any question you drop in. I recommend using > this always when you're doing logic (or to double check output values). > Drag & drop for output values is something we're hoping to work on soon! > > I hope that helped, and good luck with exploring repeats! > > Thanks, > Amelia > > > On Wed, May 21, 2014 at 3:55 PM, <mo...@cmapping.net > wrote: > >> oops, now with attachment. >> >> >> On Wednesday, May 21, 2014 8:52:43 PM UTC+1, mo...@cmapping.net wrote: >>> >>> hi everyone, >>> >>> this is probably a really rookie question, but i'm having trouble >>> getting 'repeat groups' working. >>> >>> basically, i'm trying to do a household survey in the course of which i >>> ask the respondent if other people live with him/her. assuming there are >>> others living in the household, i want to start a repeat group in which i >>> ask each individual's gender, age, and then a series of questions about >>> education and/or employment. there is also a lot of display logic within >>> this as well. >>> >>> the repeat count is supposed to be set to the number of other HH >>> members. the first question within the repeat group is the name of an >>> individual, and then i've tried to program all subsequent questions in that >>> to use that person's name. >>> >>> i'm sure there are other issues with my attempt, but the first error >>> message that comes up when i try to test in cloudcare (while trying to kick >>> off the repeat group) is the following: >>> internal error handling request: : >>> org.javarosa.xpath.XPathTypeMismatchException: XPath evaluation: type >>> mismatch Location /data/HHmembername was not found >>> >>> i've attached the exported form in excel. (it's just meant to be a test >>> so the actual content is cursory/a little nonsensical in places). >>> >>> thanks so much, in advance, to any one who takes the time to help me out. >>> >> -- >> 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. >> > >