IBM Support

How to format columns to display Phone Number format

Troubleshooting


Problem

Is it possible to display data in a 'phone number' format? For example (123)123-4567

Resolving The Problem

If the phone number is made up of three separate columns (For example, area code, 3 digit column and 4 digit column) concatenation of the columns with the '(' and '-' characters will display the number in the required format.

For example:

'(' + <areacode> + ')' + <3digitcolumn> + '-' + <4digitcolumn>

The column must be a character field or the addition of the characters '(' etc will not be accessable in the calculation dialog window. If the datatype is numeric, use the Number to String function to convert it to character.

For example: number-to-string (3digitcolumn)

If the data is stored in two columns, ie area code (123) and number (1234567) use the Left and Right functions to split the number so as to add in the hyphen.

For example: left ( number-to-string ( 8digitcolumn) , 3 ) will display the first three numbers from the 8 digit column.

[{"Product":{"code":"SSTQPQ","label":"IBM Cognos Series 7 PowerPlay"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Impromptu","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Impromptu 3.02;Impromptu 3.03;Impromptu 3.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

51938

Document Information

Modified date:
15 June 2018

UID

swg21352048