Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Phone Number Format

SonnyRD
Level 2
Level 2

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

1 Accepted Solution
Vapsy
Correct answer by
Employee
Employee

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

View solution in original post

2 Replies
Vapsy
Correct answer by
Employee
Employee

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

View solution in original post

SonnyRD
Level 2
Level 2

Thanks, Vipul. Both options sound good; definitely worth a test or two!

Sonny