Scenario Overview

In this scenario you need to format the main telephone number field of the Account entity. The format needs to look like this "207.555.3652". This makes the phone number formatting consistent across all accounts. It must also be able to strip out all non digit characters so if a user enters fields such as these they are ignored  e.g. '(', ')', '-'.

Note 1: This formatting rule must apply in the following scenarios,

-User enters data from Outlook,
-User enters data from the browser Web Client,
-User enters data from Mobile Client,
-Records are imported (e.g. via a CSV or Excel file)
-Data comes from an external data source such as a Portal.
-Data comes from an external data source such as an Integration Server

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • We create a formula that executes on the server-side when ever the Main Phone number field on the Account entity changes.
  • Next we use a Regular Expression to remove all the non-digit characters
  • We then use another Regular Expression to apply our formatting
  • Then we take the overall result of the formula & place it into the Main Phone number field

N52 Formula Manager Steps

  • Create a new formula of type 'Save to Current Record'
  • Set the Source Entity to 'Account'
  • Set the Source Property to 'Main Phone'
  • Set the Target Property to 'Main Phone'
  • Copy & paste the formula below into the formula description field & click save
  • You are ready to test


RegexReplace(RegexReplace([account.telephone1], «\D», ''), «(\d{3})(\d{3})(\d{4})»,«$1.$2.$3»)