Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Phone Number formatting

Hello!

It seems to be simple issue, but I was not able to find the answer myself, so I would need an expert advice from the forum members:

1. I have a US phone numbers field in the Table Box where the data is stored in simple numeric format: 2223334444

2. I would need it to be presented in the standard way: (222) 333-4444 or +1 (222) 333-4444, but I was not able to find the proper format in the "Number" tab of the TB Properties.

I would appreciate an advice.

Regards,

VK

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You cannot do that kind of formatting in a TableBox. You have to do the formatting in either the script or a Straight Table chart using an expression like:

'(' & left(RawPhone,3) & ')' & mid(RawPhone,4,3) & '-' & mid(RawPhone, 7)

See the attached for an example of both methods.

-Rob

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You cannot do that kind of formatting in a TableBox. You have to do the formatting in either the script or a Straight Table chart using an expression like:

'(' & left(RawPhone,3) & ')' & mid(RawPhone,4,3) & '-' & mid(RawPhone, 7)

See the attached for an example of both methods.

-Rob

Miguel_Angel_Baeyens

Unless someone provides new and more useful information about this, I'm afraid you should create your own format with string functions like

'+1 (' & Left(PhoneField, 3) & ') ' & Mid(PhoneField, 4, 3) & '-' & Right(PhoneField, 4) AS PhoneField
in your load script or something similar anywhere in your graphs, as a phone number is not really a number (you don't add or substract one from another)

Not applicable
Author

Thank you, Rob and Miguel, it works perfectly!

Regards,

VK