Phone Number Format

SonnyRD

17-03-2017

Hi all -

Does anyone know if there is a way to force the storage and display of phone numbers as 999-999-9999? Our instance is defaulted to US regional settings, but phone numbers are always stored and displayed as 0999 999-9999.

Thanks,

Sonny

Accepted Solutions (1)

Accepted Solutions (1)

Vapsy

Employee

18-03-2017

Hi Sonny,

At present, the functionality is limited and doesn't allow you to define your own regular expressions for showcasing phone number in a specific format.

Currently, the phone number format is defined by data policy named phone described in schema xtk:common.

If you wish to bypass the default setup, you can do the following

extend the nms:recipient schema, and create the attribute <attribute desc="xxx" name="mobilePhone" type="string" label="yyy" length="32" dataPolicy="none"/>

We are removing the default data policy associated with this attribute. Then you can save the phone number as you want as it is a string field.

You can also define a computed string on this attribute which can show the mobile number as you want it.

Hope this helps.

Regards,

Vipul