Query mobile user phone number in a form

Hi everyone,

I'm pretty sure I've asked this question a little while ago, but maybe things
have changed since: is it possible to query the phone number / email address
of a mobile user within a form to fill an Hidden value ?

Alternatively, is it possible to retrieve the mobile user database as an html
table for easier integration in Excel ? If it was the case, I'd do the phone /
email lookup within Excel, but I don't want anyone to have to download the
mobile user list on a regular basis.

Many thanks !

Charles

Charles,

You should be able to accomplish this by adding the phone number and email
address to the mobile user as custom user data
https://confluence.dimagi.com/display/commcarepublic/Custom+User+Data and
then accessing this in the session as described in the wiki.

Best,
Will

··· On Thu, Jun 25, 2015 at 8:08 AM, Charles Flèche wrote:

Hi everyone,

I'm pretty sure I've asked this question a little while ago, but maybe
things
have changed since: is it possible to query the phone number / email
address
of a mobile user within a form to fill an Hidden value ?

Alternatively, is it possible to retrieve the mobile user database as an
html
table for easier integration in Excel ? If it was the case, I'd do the
phone /
email lookup within Excel, but I don't want anyone to have to download the
mobile user list on a regular basis.

Many thanks !

Charles

--
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 Will. But it means that I'll have two fields to specify emails and
phone numbers: the standard ones and the custom data. I guess that would be
pretty confusing, don't you think ?

··· On Thursday, June 25, 2015 08:17:17 AM William Pride wrote: > Charles, > > You should be able to accomplish this by adding the phone number and email > address to the mobile user as custom user data > and > then accessing this in the session as described in the wiki. > > Best, > Will > > On Thu, Jun 25, 2015 at 8:08 AM, Charles Flèche wrote: > > Hi everyone, > > > > I'm pretty sure I've asked this question a little while ago, but maybe > > things > > have changed since: is it possible to query the phone number / email > > address > > of a mobile user within a form to fill an Hidden value ? > > > > Alternatively, is it possible to retrieve the mobile user database as an > > html > > table for easier integration in Excel ? If it was the case, I'd do the > > phone / > > email lookup within Excel, but I don't want anyone to have to download the > > mobile user list on a regular basis. > > > > Many thanks ! > > > > Charles > > > > > > -- > > 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.

Confirming that by "standard ones" you mean during regular creation of
mobile users on CommCareHQ?

Agreed that data redundancy is, generally, bad. However, unfortunately at
the moment we don't include this data in the session (I'm not even sure
that CommCare is aware of the user's email/phone number by default at the
moment) so you'd have to deploy this workaround to access the data during
form entry.

Another possibility if you wanted retrieve the data separately IE from
Excel as suggested in your first email would be to use the list mobile
workers
https://confluence.dimagi.com/display/commcarepublic/List+Mobile+Workers
API.

Best,
Will

··· On Thu, Jun 25, 2015 at 8:19 AM, Charles Flèche wrote:

Thanks Will. But it means that I'll have two fields to specify emails and
phone numbers: the standard ones and the custom data. I guess that would be
pretty confusing, don't you think ?

On Thursday, June 25, 2015 08:17:17 AM William Pride wrote:

Charles,

You should be able to accomplish this by adding the phone number and
email
address to the mobile user as custom user data
https://confluence.dimagi.com/display/commcarepublic/Custom+User+Data
and
then accessing this in the session as described in the wiki.

Best,
Will

On Thu, Jun 25, 2015 at 8:08 AM, Charles Flèche < mhealth-myanmar@tsfi.org> wrote:

Hi everyone,

I'm pretty sure I've asked this question a little while ago, but maybe
things
have changed since: is it possible to query the phone number / email
address
of a mobile user within a form to fill an Hidden value ?

Alternatively, is it possible to retrieve the mobile user database as
an
html
table for easier integration in Excel ? If it was the case, I'd do the
phone /
email lookup within Excel, but I don't want anyone to have to download
the
mobile user list on a regular basis.

Many thanks !

Charles

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

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

Yes, it is what I mean by "standard ones", sorry for the lack of precision.

Thanks for the API suggestion, unfortunately it won't be possible for this
project. I keep it in mind though.

I really don't want data redundancy, so I guess the last choice is to download
the Mobile Workers Excel on a regular basis and do a lookup. It is an extra
thing to think about, but I guess it is better that potential data redundancy.

Thanks Will.

··· On Thursday, June 25, 2015 08:27:32 AM William Pride wrote: > Confirming that by "standard ones" you mean during regular creation of > mobile users on CommCareHQ? > > Agreed that data redundancy is, generally, bad. However, unfortunately at > the moment we don't include this data in the session (I'm not even sure > that CommCare is aware of the user's email/phone number by default at the > moment) so you'd have to deploy this workaround to access the data during > form entry. > > Another possibility if you wanted retrieve the data separately IE from > Excel as suggested in your first email would be to use the list mobile > workers > > API. > > Best, > Will > > On Thu, Jun 25, 2015 at 8:19 AM, Charles Flèche wrote: > > Thanks Will. But it means that I'll have two fields to specify emails and > > phone numbers: the standard ones and the custom data. I guess that would > > be > > pretty confusing, don't you think ? > > > > On Thursday, June 25, 2015 08:17:17 AM William Pride wrote: > > > Charles, > > > > > > You should be able to accomplish this by adding the phone number and > > > > email > > > > > address to the mobile user as custom user data > > > > > > > and > > > > > then accessing this in the session as described in the wiki. > > > > > > Best, > > > Will > > > > > > On Thu, Jun 25, 2015 at 8:08 AM, Charles Flèche < mhealth-myanmar@tsfi.org> wrote: > > > > Hi everyone, > > > > > > > > I'm pretty sure I've asked this question a little while ago, but maybe > > > > things > > > > have changed since: is it possible to query the phone number / email > > > > address > > > > of a mobile user within a form to fill an Hidden value ? > > > > > > > > Alternatively, is it possible to retrieve the mobile user database as > > > > an > > > > > > html > > > > table for easier integration in Excel ? If it was the case, I'd do the > > > > phone / > > > > email lookup within Excel, but I don't want anyone to have to download > > > > the > > > > > > mobile user list on a regular basis. > > > > > > > > Many thanks ! > > > > > > > > Charles > > > > > > > > > > > > -- > > > > 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. > > > > -- > > 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.

Hey Charles,

This has been a pain point for some time and to my knowledge there's no
good reason the fields aren't available in the session. Do you know if
there is a uservoice item for this?

I'll personally see if I can look into the feasibility and see if it's
something we might be able to change quickly.

Cory

··· On Thu, Jun 25, 2015 at 8:38 AM, Charles Flèche wrote:

Yes, it is what I mean by "standard ones", sorry for the lack of precision.

Thanks for the API suggestion, unfortunately it won't be possible for this
project. I keep it in mind though.

I really don't want data redundancy, so I guess the last choice is to
download
the Mobile Workers Excel on a regular basis and do a lookup. It is an extra
thing to think about, but I guess it is better that potential data
redundancy.

Thanks Will.

On Thursday, June 25, 2015 08:27:32 AM William Pride wrote:

Confirming that by "standard ones" you mean during regular creation of
mobile users on CommCareHQ?

Agreed that data redundancy is, generally, bad. However, unfortunately at
the moment we don't include this data in the session (I'm not even sure
that CommCare is aware of the user's email/phone number by default at the
moment) so you'd have to deploy this workaround to access the data during
form entry.

Another possibility if you wanted retrieve the data separately IE from
Excel as suggested in your first email would be to use the list mobile
workers
<
List Mobile Workers - CommCare Public - CommCare Public>
API.

Best,
Will

On Thu, Jun 25, 2015 at 8:19 AM, Charles Flèche < mhealth-myanmar@tsfi.org> wrote:

Thanks Will. But it means that I'll have two fields to specify emails
and
phone numbers: the standard ones and the custom data. I guess that
would
be
pretty confusing, don't you think ?

On Thursday, June 25, 2015 08:17:17 AM William Pride wrote:

Charles,

You should be able to accomplish this by adding the phone number and

email

address to the mobile user as custom user data
<
Custom User Data - CommCare Public - CommCare Public>

and

then accessing this in the session as described in the wiki.

Best,
Will

On Thu, Jun 25, 2015 at 8:08 AM, Charles Flèche < mhealth-myanmar@tsfi.org> wrote:

Hi everyone,

I'm pretty sure I've asked this question a little while ago, but
maybe
things
have changed since: is it possible to query the phone number /
email
address
of a mobile user within a form to fill an Hidden value ?

Alternatively, is it possible to retrieve the mobile user database
as

an

html
table for easier integration in Excel ? If it was the case, I'd do
the
phone /
email lookup within Excel, but I don't want anyone to have to
download

the

mobile user list on a regular basis.

Many thanks !

Charles

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

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

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

That would be a very useful change.

Best

Tim

Hey all,

I'm happy to announce that we just added session support for the user's
first and last name as well as default phone number. These are now
available via the following fields and accessible via the same mechanism
described on custom user data
https://confluence.dimagi.com/display/commcarepublic/Custom+User+Data:

commcare_first_name
commcare_last_name
commcare_phone_number

thanks,
Cory

··· On Thu, Jun 25, 2015 at 11:25 PM, Tim wrote:

That would be a very useful change.

Best

Tim

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

Awesome, thanks guys !

··· On Wednesday, July 01, 2015 11:22:21 AM Cory Zue wrote: > Hey all, > > I'm happy to announce that we just added session support for the user's > first and last name as well as default phone number. These are now > available via the following fields and accessible via the same mechanism > described on custom user data > : > > commcare_first_name > commcare_last_name > commcare_phone_number > > thanks, > Cory > > On Thu, Jun 25, 2015 at 11:25 PM, Tim wrote: > > That would be a very useful change. > > > > Best > > > > Tim > > > > -- > > 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.