Show calculated totals for a repeat group once group is completed

Hello

Sorry if this is obvious. I have an ODK form that surveys young girls, and
will repeat a section of the survey for every girl in the household. So if
a household has four girls, it will repeat questions on age and school
attendance four times.

once that is done, I'd like to show aggregate data in the survey so that
household questions can be based on the aggregate data. For instance if
there are two girls under fifteen, we'd like to ask some questions, we'd
like the next section to state - you have two girls under fifteen, please
answer the following, etc.

to make long story short, can you get a calculated value or total from a
repeat count and then use that in the next group. I am using XLSforms but
if I have to learn xforms to do it so be it.

Hope I make myself clear,

Thanks

Craig Savel

I fear I should've asked this in ODK community more appropriate there,
apologies.

ยทยทยท On Saturday, May 28, 2016 at 4:35:35 PM UTC-4, Craig Savel wrote: > > Hello > > Sorry if this is obvious. I have an ODK form that surveys young girls, and > will repeat a section of the survey for every girl in the household. So if > a household has four girls, it will repeat questions on age and school > attendance four times. > > once that is done, I'd like to show aggregate data in the survey so that > household questions can be based on the aggregate data. For instance if > there are two girls under fifteen, we'd like to ask some questions, we'd > like the next section to state - you have two girls under fifteen, please > answer the following, etc. > > to make long story short, can you get a calculated value or total from a > repeat count and then use that in the next group. I am using XLSforms but > if I have to learn xforms to do it so be it. > > Hope I make myself clear, > > Thanks > > Craig Savel > >

Maybe you can use following step in the xform:

For example

  1. We must make rule for the eligible, Use type "calculate" name variable "eligible_under50" in the coloum "calculation" fill (${age} < 50)
  2. Provide format string to the number, in the other row use type "calculate" name variable "num_under50", coloum relevant fill " ${eligible_under50" calculation fill "number(${eligible_under50})
  3. Sum the number, In the and of group repeat use coloum type calculate name variable "sum_eligible_under50" coloum calculation fill "sum(${num_under50})
    4.Get the result, next in your question maybe something like this " Q25. The number of people under 50?${sum_eligible_under50}"

Regards

Rashida