How to include Position number from repeat group into a unique identifier for each househeold member

Hello,

I am conducting a household survey where I have a created a unique
identifier (hhid) for the household based on
State/township/village/household number

I would like to add the position number in a repeating group to this Unique
identifier to provide each household member with their own Unique ID.

However it does not seem to work when I concat the hidden variable with the
label containing position (), all I get is the hhid with ok at the end.

ID there another way to do this?

Jess

Hi Jess,

If you’re in a hidden value that is inside a repeat, you can reference the
current position using *position(…) . *Your calculation may look
something like "concat(/data/hh_repeat/hhid, position(…) )

The value of any label is always “ok” - the text you display in the label
can be in multiple languages and isn’t set as the label’s value.

Thanks,
Sheel

··· On Sun, Jan 17, 2016 at 9:40 PM, Jessica Hall wrote:

Hello,

I am conducting a household survey where I have a created a unique
identifier (hhid) for the household based on
State/township/village/household number

I would like to add the position number in a repeating group to this
Unique identifier to provide each household member with their own Unique
ID.

However it does not seem to work when I concat the hidden variable with
the label containing position (), all I get is the hhid with ok at the end.

ID there another way to do this?

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

Many thanks Sheel,

That worked perfectly.

Jess

··· On Tuesday, January 19, 2016 at 7:28:03 AM UTC+11, Sheel Shah wrote: > > Hi Jess, > > If you're in a hidden value that is inside a repeat, you can reference the > current position using *position(..) . *Your calculation may look > something like "concat(/data/hh_repeat/hhid, position(..) ) > > The value of any label is always "ok" - the text you display in the label > can be in multiple languages and isn't set as the label's value. > > Thanks, > Sheel > > On Sun, Jan 17, 2016 at 9:40 PM, Jessica Hall <jhal...@gmail.com > wrote: > >> Hello, >> >> I am conducting a household survey where I have a created a unique >> identifier (hhid) for the household based on >> State/township/village/household number >> >> I would like to add the position number in a repeating group to this >> Unique identifier to provide each household member with their own Unique >> ID. >> >> However it does not seem to work when I concat the hidden variable with >> the label containing position (), all I get is the hhid with ok at the end. >> >> ID there another way to do this? >> >> 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 > > >