cancel
Showing results for 
Search instead for 
Did you mean: 

Power Automate - Format Phone Number Easy

Scenario:

We have a phone number coming in from a secondary system as a integer number. We than want to add some formatting to this to be easily read and look cleaner. For example, a phone number comes in like this:
4035557890 And make it look like (403)-555-7890

 

Things to Know:

Since we add '-' and '( )' this turns our data type to become an String. Keep this in mind, since you wont be able to pass this into a field in another system that is looking for a Integer value

 

The Flow:

This Flow is very simple. To achieve the formatted number I am using the action 'Format number'. This is a fairly new connector that is mainly used to format currency values. But we can utilize the format to define any formatting we want.

flow

 

Looking at the above picture, we are passing a Integer phone number into the Format number action. Than we specify the format we want to use by selecting the drop down > clicking 'Enter custom value'

customvalue

 

End Result!

successflow1

 

Conclusion:

Since this action is fairly new, I am curious and looking forward to see if the Power Automate team will expand and add more actions like this to make formatting a breeze.

 

Post originally from:

https://flowaltdelete.ca/2020/07/02/power-automate-format-phone-number-easy/

 

Thanks for reading!

Comments

Hi @Jcook,

 

Thanks for sharing this blog. Very easy action (Format Number) to use.

 

Maybe it's also useful to add that you can achieve a similar thing with an expression like this:

formatNumber(variable('PhoneNum'), '(###)-###-####')

 

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • SharePoint, Microsoft 365 and Power Platform Developer | Contributor on SharePoint StackExchange
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/