web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Phone number format fr...
Power Automate
Answered

Phone number format from forms to sharepoint list or during create rows

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a flow that move data from Forms to a SharePoint list then one that once a week uses conditions to gather information from the list create a excel table and email it.  

I need to have the phone numbers in the Excel file formatted +1 (xxx) xxx-xxxx.

Is there a function/expression I can use either when I move the data from forms to the list that removes all spaces and characters then formats or as I add the rows to my table?

 

help 2.PNGhelp 1.PNG

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

     

    Could you please explain removing characters?  Also provide some sample data.

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

     

    You could use the expression. See below.

     

    formatNumber(4537893833,'1(###) ###-####')
     
    This will output
     
    1(453) 789-3833
     
    Hope it helps.
     
    Thanks
     
     
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @AB Many of the forms responses come in with various spaces or characters.  If I can clean the numbers from xxx-xxx xxxx to a xxxxxxxxx then format to xxx-xxx-xxxx or go directly to xxx-xxx-xxxx.  I figured out the expression 

     

    replace(replace(outputs('Get_response_details')?['body/re974a84bf6db4095b0c3dbbac641c242'],' ',''), '-','') to clean the number of spaces and dashes in my "create item" action

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This gets me the second part.  Can I replace and format in 1 expression?

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

     

    Yes you can. Please see below

     

    formatNumber(replace(replace(outputs('Get_response_details')?['body/re974a84bf6db4095b0c3dbbac641c242'],' ',''), '-',''),'1(###) ###-####')

     

    Change the highlighted portion format accoringly.

     

    Thanks

  • Verified answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

    If flow complains about the datatype then convert to int()

     

    formatNumber(int(replace(replace(outputs('Get_response_details')?['body/re974a84bf6db4095b0c3dbbac641c242'],' ',''), '-','')),'1(###) ###-####')

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 523

#2
Valantis Profile Picture

Valantis 318

#3
David_MA Profile Picture

David_MA 235 Super User 2026 Season 1

Last 30 days Overall leaderboard