Unique IDS based on count with 2 repeat groups

Hi There,

I currently have a household listing form which uses a repeat count based
on the number of people in the household.
And then it goes through registering everyone in the household based on
that count.

I have also developed a unique ID using each household members position()
combined with state/township/village and household.

However after this I have a question which asks whether there is any other
people living in the house just in case people have been left out of the
original count.

And then if the enumerator clicks yes the same set of questions which was
in the previous repeat group that was based on a count, is listed in a
separate repeat group.

My problem is that because i have based my unique id on the position number
of the first repeat group. I am not sure whether it is possible to have the
same system for any extra household members.

Is there anyway of combining these 2 repeat groups to ensure my unique Id
system continues for those extra household members?

Cheers,
Jess

Like for example would it be possible to use the final position number in
the first group +1 or something like that?

··· On Thursday, January 21, 2016 at 1:14:16 PM UTC+11, Jessica Hall wrote: > > Hi There, > > I currently have a household listing form which uses a repeat count based > on the number of people in the household. > And then it goes through registering everyone in the household based on > that count. > > I have also developed a unique ID using each household members position() > combined with state/township/village and household. > > However after this I have a question which asks whether there is any other > people living in the house just in case people have been left out of the > original count. > > And then if the enumerator clicks yes the same set of questions which was > in the previous repeat group that was based on a count, is listed in a > separate repeat group. > > My problem is that because i have based my unique id on the position > number of the first repeat group. I am not sure whether it is possible to > have the same system for any extra household members. > > Is there anyway of combining these 2 repeat groups to ensure my unique Id > system continues for those extra household members? > > Cheers, > Jess > > > > > > > >

Hi Jessica,

In order to look into this further, can you tell me a bit more about what
you’re trying to do? What you say “position” of the family member, what
does that mean? And are you assigning multiple unique IDs from one form?
And to whom/what are these IDs assigned - people, or households?

Also, when you have someone who DID leave a household member out of their
original response and you have to fill out the second repeat group, does
that mean the original ID that was created needs to be updated?

Meryn Robinson
Field Manager, Dimagi

··· On Wednesday, January 20, 2016 at 9:14:16 PM UTC-5, Jessica Hall wrote: > > Hi There, > > I currently have a household listing form which uses a repeat count based > on the number of people in the household. > And then it goes through registering everyone in the household based on > that count. > > I have also developed a unique ID using each household members position() > combined with state/township/village and household. > > However after this I have a question which asks whether there is any other > people living in the house just in case people have been left out of the > original count. > > And then if the enumerator clicks yes the same set of questions which was > in the previous repeat group that was based on a count, is listed in a > separate repeat group. > > My problem is that because i have based my unique id on the position > number of the first repeat group. I am not sure whether it is possible to > have the same system for any extra household members. > > Is there anyway of combining these 2 repeat groups to ensure my unique Id > system continues for those extra household members? > > Cheers, > Jess > > > > > > > >

Hi Merryn,

Thanks for your reply.

So the first repeat group has a ‘repeat Count’ based on the number of
people in the household.

Then based on this count I have used the “position(…)” of the household
member to create a unique Id for that individiual household member by
combining the houehold with the position number
(concat(/Respondent_householdlisting_myanmar/hhid, position(…) ). Tshi is
created form one form and carried to other modules and forms.

However I then have this separate repeat group which is essentially a check
to make sure no household members have been forgotten or left out.

The second repeat group follows a question which asks whether there are any
additional household members. If they select yes then the second repeat
group appears with the same set of questions as the first.

So what I would like to know is whether there is any way of counting the
position numbers consecutively in the second repeat following from the
first repeat group. I.e if I have 5 people in the first repeat Position
1-5. Is it possible to start counting the 6th person in the second repeat?
Or can I change the start number for the second repeat?

I hope that makes sense.

Cheers,
Jess

··· On Wednesday, January 27, 2016 at 9:49:37 AM UTC+11, mrobinson wrote: > > Hi Jessica, > > In order to look into this further, can you tell me a bit more about what > you're trying to do? What you say "position" of the family member, what > does that mean? And are you assigning multiple unique IDs from one form? > And to whom/what are these IDs assigned - people, or households? > > Also, when you have someone who DID leave a household member out of their > original response and you have to fill out the second repeat group, does > that mean the original ID that was created needs to be updated? > > Meryn Robinson > Field Manager, Dimagi > > On Wednesday, January 20, 2016 at 9:14:16 PM UTC-5, Jessica Hall wrote: >> >> Hi There, >> >> I currently have a household listing form which uses a repeat count >> based on the number of people in the household. >> And then it goes through registering everyone in the household based on >> that count. >> >> I have also developed a unique ID using each household members position() >> combined with state/township/village and household. >> >> However after this I have a question which asks whether there is any >> other people living in the house just in case people have been left out of >> the original count. >> >> And then if the enumerator clicks yes the same set of questions which was >> in the previous repeat group that was based on a count, is listed in a >> separate repeat group. >> >> My problem is that because i have based my unique id on the position >> number of the first repeat group. I am not sure whether it is possible to >> have the same system for any extra household members. >> >> Is there anyway of combining these 2 repeat groups to ensure my unique Id >> system continues for those extra household members? >> >> Cheers, >> Jess >> >> >> >> >> >> >> >>

Hey Jess,

There isn’t a great way to do this. One suggestion I have:

  • Add a hidden value to your form that tracks the number of repeats you
    have in the first group. Set the calculation to
    count(/data/first_repeat_group) For example, you might call this hidden
    value first_repeat_count
  • In your second repeat group, when setting the household number instead of
    just using position(…), you can use /data/first_repeat_count + position(…)

Thanks,
Sheel

··· On Tue, Jan 26, 2016 at 6:56 PM, Jessica Hall wrote:

Hi Merryn,

Thanks for your reply.

So the first repeat group has a ‘repeat Count’ based on the number of
people in the household.

Then based on this count I have used the “position(…)” of the household
member to create a unique Id for that individiual household member by
combining the houehold with the position number
(concat(/Respondent_householdlisting_myanmar/hhid, position(…) ). Tshi is
created form one form and carried to other modules and forms.

However I then have this separate repeat group which is essentially a
check to make sure no household members have been forgotten or left out.

The second repeat group follows a question which asks whether there are
any additional household members. If they select yes then the second repeat
group appears with the same set of questions as the first.

So what I would like to know is whether there is any way of counting the
position numbers consecutively in the second repeat following from the
first repeat group. I.e if I have 5 people in the first repeat Position
1-5. Is it possible to start counting the 6th person in the second repeat?
Or can I change the start number for the second repeat?

I hope that makes sense.

Cheers,
Jess

On Wednesday, January 27, 2016 at 9:49:37 AM UTC+11, mrobinson wrote:

Hi Jessica,

In order to look into this further, can you tell me a bit more about what
you’re trying to do? What you say “position” of the family member, what
does that mean? And are you assigning multiple unique IDs from one form?
And to whom/what are these IDs assigned - people, or households?

Also, when you have someone who DID leave a household member out of their
original response and you have to fill out the second repeat group, does
that mean the original ID that was created needs to be updated?

Meryn Robinson
Field Manager, Dimagi

On Wednesday, January 20, 2016 at 9:14:16 PM UTC-5, Jessica Hall wrote:

Hi There,

I currently have a household listing form which uses a repeat count
based on the number of people in the household.
And then it goes through registering everyone in the household based on
that count.

I have also developed a unique ID using each household members
position() combined with state/township/village and household.

However after this I have a question which asks whether there is any
other people living in the house just in case people have been left out of
the original count.

And then if the enumerator clicks yes the same set of questions which
was in the previous repeat group that was based on a count, is listed in a
separate repeat group.

My problem is that because i have based my unique id on the position
number of the first repeat group. I am not sure whether it is possible to
have the same system for any extra household members.

Is there anyway of combining these 2 repeat groups to ensure my unique
Id system continues for those extra household members?

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.


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

Thanks Sheel

··· On Thursday, January 28, 2016 at 7:31:16 AM UTC+11, Sheel Shah wrote: > > Hey Jess, > > There isn't a great way to do this. One suggestion I have: > - Add a hidden value to your form that tracks the number of repeats you > have in the first group. Set the calculation to > count(/data/first_repeat_group) For example, you might call this hidden > value first_repeat_count > - In your second repeat group, when setting the household number instead > of just using position(..), you can use /data/first_repeat_count + > position(..) > > Thanks, > Sheel > > On Tue, Jan 26, 2016 at 6:56 PM, Jessica Hall <jhal...@gmail.com > wrote: > >> Hi Merryn, >> >> >> Thanks for your reply. >> >> So the first repeat group has a 'repeat Count' based on the number of >> people in the household. >> >> Then based on this count I have used the "position(..)" of the household >> member to create a unique Id for that individiual household member by >> combining the houehold with the position number >> (concat(/Respondent_householdlisting_myanmar/hhid, position(..) ). Tshi is >> created form one form and carried to other modules and forms. >> >> However I then have this separate repeat group which is essentially a >> check to make sure no household members have been forgotten or left out. >> >> The second repeat group follows a question which asks whether there are >> any additional household members. If they select yes then the second repeat >> group appears with the same set of questions as the first. >> >> So what I would like to know is whether there is any way of counting the >> position numbers consecutively in the second repeat following from the >> first repeat group. I.e if I have 5 people in the first repeat Position >> 1-5. Is it possible to start counting the 6th person in the second repeat? >> Or can I change the start number for the second repeat? >> >> >> I hope that makes sense. >> >> Cheers, >> Jess >> >> >> >> >> >> >> >> >> On Wednesday, January 27, 2016 at 9:49:37 AM UTC+11, mrobinson wrote: >>> >>> Hi Jessica, >>> >>> In order to look into this further, can you tell me a bit more about >>> what you're trying to do? What you say "position" of the family member, >>> what does that mean? And are you assigning multiple unique IDs from one >>> form? And to whom/what are these IDs assigned - people, or households? >>> >>> Also, when you have someone who DID leave a household member out of >>> their original response and you have to fill out the second repeat group, >>> does that mean the original ID that was created needs to be updated? >>> >>> Meryn Robinson >>> Field Manager, Dimagi >>> >>> On Wednesday, January 20, 2016 at 9:14:16 PM UTC-5, Jessica Hall wrote: >>>> >>>> Hi There, >>>> >>>> I currently have a household listing form which uses a repeat count >>>> based on the number of people in the household. >>>> And then it goes through registering everyone in the household based on >>>> that count. >>>> >>>> I have also developed a unique ID using each household members >>>> position() combined with state/township/village and household. >>>> >>>> However after this I have a question which asks whether there is any >>>> other people living in the house just in case people have been left out of >>>> the original count. >>>> >>>> And then if the enumerator clicks yes the same set of questions which >>>> was in the previous repeat group that was based on a count, is listed in a >>>> separate repeat group. >>>> >>>> My problem is that because i have based my unique id on the position >>>> number of the first repeat group. I am not sure whether it is possible to >>>> have the same system for any extra household members. >>>> >>>> Is there anyway of combining these 2 repeat groups to ensure my unique >>>> Id system continues for those extra household members? >>>> >>>> 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. >> > > > > -- > Sheel Shah > Project Manager | Dimagi > m: +1.781.428.5419 | skype: sheel_shah > > >