# Collecting telephone numbers in a form

**URL:** <https://forum.dimagi.com/t/collecting-telephone-numbers-in-a-form/2957>\
**Category:** Users\
**Created:** [September 14, 2016, 8:25am UTC](https://forum.dimagi.com/t/collecting-telephone-numbers-in-a-form/2957 "2016-09-14T08:25:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amanda\_Agar](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@Amanda\_Agar](https://forum.dimagi.com/u/Amanda_Agar)\
**Post date:** [September 14, 2016, 8:25am UTC](https://forum.dimagi.com/t/collecting-telephone-numbers-in-a-form/2957/1 "2016-09-14T08:25:57Z")

</div>

Hi  
Can anyone help? I have built a form and collected data; in the form I  
have asked for the interviewee's telephone number using the telephone  
number question but when I export the data the 0 is missing from the  
beginning of the telephone number. How can I get the data to export  
including the 0 at the start of the telephone number?  
Thanks  
Amanda

---

<div class="post-metadata">

**Author:** ![Clayton\_Sims](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/clayton_sims/32/496_2.png) [@Clayton\_Sims](https://forum.dimagi.com/u/Clayton_Sims)\
**Post date:** [September 14, 2016, 3:14pm UTC](https://forum.dimagi.com/t/collecting-telephone-numbers-in-a-form/2957/2 "2016-09-14T15:14:12Z")

</div>

Amanda,

Unfortunately this issue occurred at the time the data was entered.  
CommCare has a special data type (Phone number or numeric ID) that can be  
used for collecting "numbers" where the specifics of the string entered  
(IE: 010 v. 10) are important. The normal "number" data input assumes that  
only the actual number being entered needs to be retained. There's not an  
easy way for the data to be fixed in our DB retroactively.

You can use excel to Pad the input data to add leading Zeros to the input  
data, however,

> <https://stackoverflow.com/questions/3992541/add-leading-zeroes-0s-to-existing-excel-values-to-certain-length>

zeroes-0s-to-existing-excel-values-to-certain-length

which can correct the issue directly inside of the export.

-Clayton

> **···**
>
> On Wed, Sep 14, 2016 at 4:25 AM, Amanda Agar wrote:
> 
> > Hi  
> > Can anyone help? I have built a form and collected data; in the form I  
> > have asked for the interviewee's telephone number using the telephone  
> > number question but when I export the data the 0 is missing from the  
> > beginning of the telephone number. How can I get the data to export  
> > including the 0 at the start of the telephone number?  
> > Thanks  
> > Amanda
> > 
> > --  
> > 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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Giovanni\_Capalbo](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/g/977dab/32.png) [@Giovanni\_Capalbo](https://forum.dimagi.com/u/Giovanni_Capalbo)\
**Post date:** [September 16, 2016, 1:39pm UTC](https://forum.dimagi.com/t/collecting-telephone-numbers-in-a-form/2957/3 "2016-09-16T13:39:59Z")

</div>

Hi Amanda,

Just to add to what Clayton mentioned - if you're noticing that you did  
enter the data with the "Phone Number or Numeric ID" question type but the  
data is still missing the leading zero in the export, it might be because  
you've downloaded the data in \*.csv format and Excel is automatically  
removing the leading zero when it opens the file. If that's the case,  
there's two possible solutions:

1. Choose a different format for the export (such as Excel 2007) and  
download again from CommCareHQ, or

2. When opening the \*.csv file in Excel, instead of double clicking on it,  
you'll want to open it with the Text Import Wizard  
[https://support.office.com/en-us/article/Text-Import-Wizard-c5b02af6-fda1-4440-899f-f78bafe41857?ui=en-US&rs=en-US&ad=US](https://support.office.com/en-us/article/Text-Import-Wizard-c5b02af6-fda1-4440-899f-f78bafe41857?ui=en-US&rs=en-US&ad=US)  
which  
will let you choose the Text data type for the column in question so that  
it preserves the leading zero.

Thanks,  
Giovanni

> **···**
>
> On Wed, Sep 14, 2016 at 11:14 AM, Clayton Sims wrote:
> 
> > Amanda,
> > 
> > Unfortunately this issue occurred at the time the data was entered.  
> > CommCare has a special data type (Phone number or numeric ID) that can be  
> > used for collecting "numbers" where the specifics of the string entered  
> > (IE: 010 v. 10) are important. The normal "number" data input assumes that  
> > only the actual number being entered needs to be retained. There's not an  
> > easy way for the data to be fixed in our DB retroactively.
> > 
> > You can use excel to Pad the input data to add leading Zeros to the input  
> > data, however,  
> > [padding - Add leading zeroes/0's to existing Excel values to certain length - Stack Overflow](http://stackoverflow.com/questions/3992541/add-leading-zeroe)  
> > s-0s-to-existing-excel-values-to-certain-length
> > 
> > which can correct the issue directly inside of the export.
> > 
> > -Clayton
> > 
> > On Wed, Sep 14, 2016 at 4:25 AM, Amanda Agar [gzf4.1over@gmail.com](mailto:gzf4.1over@gmail.com) wrote:
> > 
> > > Hi  
> > > Can anyone help? I have built a form and collected data; in the form I  
> > > have asked for the interviewee's telephone number using the telephone  
> > > number question but when I export the data the 0 is missing from the  
> > > beginning of the telephone number. How can I get the data to export  
> > > including the 0 at the start of the telephone number?  
> > > Thanks  
> > > Amanda
> > > 
> > > --  
> > > 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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/d/optout](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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Amanda\_Agar](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@Amanda\_Agar](https://forum.dimagi.com/u/Amanda_Agar)\
**Post date:** [September 16, 2016, 1:46pm UTC](https://forum.dimagi.com/t/collecting-telephone-numbers-in-a-form/2957/4 "2016-09-16T13:46:22Z")

</div>

Hi and thanks for the feedback. I think this is the most possible reason  
as we set the form to capture 'phone number or numeric ID' will give it a  
try.

Thanks

Amanda

> **···**
>
> On Fri, Sep 16, 2016 at 2:39 PM, Giovanni Capalbo wrote:
> 
> > Hi Amanda,
> > 
> > Just to add to what Clayton mentioned - if you're noticing that you did  
> > enter the data with the "Phone Number or Numeric ID" question type but the  
> > data is still missing the leading zero in the export, it might be because  
> > you've downloaded the data in \*.csv format and Excel is automatically  
> > removing the leading zero when it opens the file. If that's the case,  
> > there's two possible solutions:
> > 
> > 1. Choose a different format for the export (such as Excel 2007) and  
> > download again from CommCareHQ, or
> > 
> > 2. When opening the \*.csv file in Excel, instead of double clicking on it,  
> > you'll want to open it with the Text Import Wizard  
> > [https://support.office.com/en-us/article/Text-Import-Wizard-c5b02af6-fda1-4440-899f-f78bafe41857?ui=en-US&rs=en-US&ad=US](https://support.office.com/en-us/article/Text-Import-Wizard-c5b02af6-fda1-4440-899f-f78bafe41857?ui=en-US&rs=en-US&ad=US) which  
> > will let you choose the Text data type for the column in question so that  
> > it preserves the leading zero.
> > 
> > Thanks,  
> > Giovanni
> > 
> > On Wed, Sep 14, 2016 at 11:14 AM, Clayton Sims [csims@dimagi.com](mailto:csims@dimagi.com) wrote:
> > 
> > > Amanda,
> > > 
> > > Unfortunately this issue occurred at the time the data was entered.  
> > > CommCare has a special data type (Phone number or numeric ID) that can be  
> > > used for collecting "numbers" where the specifics of the string entered  
> > > (IE: 010 v. 10) are important. The normal "number" data input assumes that  
> > > only the actual number being entered needs to be retained. There's not an  
> > > easy way for the data to be fixed in our DB retroactively.
> > > 
> > > You can use excel to Pad the input data to add leading Zeros to the input  
> > > data, however,  
> > > [padding - Add leading zeroes/0's to existing Excel values to certain length - Stack Overflow](http://stackoverflow.com/questions/3992541/add-leading-zeroe)  
> > > s-0s-to-existing-excel-values-to-certain-length
> > > 
> > > which can correct the issue directly inside of the export.
> > > 
> > > -Clayton
> > > 
> > > On Wed, Sep 14, 2016 at 4:25 AM, Amanda Agar [gzf4.1over@gmail.com](mailto:gzf4.1over@gmail.com) wrote:
> > > 
> > > > Hi  
> > > > Can anyone help? I have built a form and collected data; in the form I  
> > > > have asked for the interviewee's telephone number using the telephone  
> > > > number question but when I export the data the 0 is missing from the  
> > > > beginning of the telephone number. How can I get the data to export  
> > > > including the 0 at the start of the telephone number?  
> > > > Thanks  
> > > > Amanda
> > > > 
> > > > --  
> > > > 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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/d/optout](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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "commcare-users" group.  
> > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > topic/commcare-users/H2VwtQ8jZLg/unsubscribe.  
> > To unsubscribe from this group and all its topics, send an email to  
> > [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
