Skip to main content


 

Symptoms


Field keeps dropping the leading zeros off a Phone Number field in a text box
 

Diagnoses


This issue occurs when you have a text box set up with a data type property set as text for a field that is varchar(50) in sql server. For example: storing mobile phone numbers, however it keeps dropping off the leading zeros off the number before it saves it to the field. For example 0878118874 is saving as 878118874.
 

Resolution

Change the datatype for that specific field within SQL from Int to Nvarchar2. This should resolve the issue.




 

But then, sometimes for example, when creating a 4 digit number of reference, then convert it to char on sql, when you view it on form during get list view, it still drops the zeros. 

how do you fix that further?

 


Reply