Number Formatting
What can it do?
If numbers in AD do not have the format/spacing that is required in a mail signature, DS-Client can now reformat it without the need to change the source data.
It works on number fields only. It does not work if you have phone numbers in non-standard fields.
So, +4577340706 could be formatted to +45 7734.0706 when a signature is made.
Setting the format
Go to Template Configuration in DS-Manager to add a format for desired numbers.
Example: DIRECT=11?3 4 4||9?2-7
It reads like this: If the number has 11 characters then format like this XXX XXXX XXXX
+4577340706 is 11 chars including the + sign.
ONLY the signs: dot dash space, can be used in formatting. E.g. +45-7734.0706
The double pipe || gives an alternate format if only 9 chars are found. This is handy if you have a mixed data set.
Details
Char Length
Numbers are first normalized. All dot dash spaces are removed to make a compact number block to work from.
+45 7734.0706 -> +4577340760
So reformatting is also possible. This is handy if some percent of users already has the correct format.
+45 7734.0607 -> +4577340706
or 77 34 07 06 -> 77340706
or +45-77340706 -> +4577340706
Derive your format code from the normalized form.
Extensions
Extension numbers are preserved, by first removing and then re-appending.
This is a number with an extension: +4577340706#012
Formatting then only works on the main number. So, while deriving format code, do not count the extension part.
Formatting-Family (Formatting priority)
Formatting code can have multiple formats included, should your numbers vary a cross your user base
Use a || (double pipe) to add additional format code.
DIRECT=11?3 4 4||9?2-7 means that if 11 digits is found it should use the 3 4 4 format (xxx yyyy zzzz). And if 9 digits are found then 2-7 (xx-yyyyyyy).
If a phone number is found that has no corresponding format set, it will just leave it as is.
Only space dash dot can be used in format code.
Eg. here all 3 types are used in desired result +45 7734.0706 or +61-553 663 22
If any other separator then these 3 are found in the format code then processing will be skipped for that number.
It can also be used to just remove any space dot dash from numbers and make a single block.
Code: 11?11 - After normalization the number is used as-is.