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 Apps / Formatting Phone Numbe...
Power Apps
Answered

Formatting Phone Number on Edit Form

(0) ShareShare
ReportReport
Posted on by 1,712

Hello,

I have two separated SharePoint lists that contain the following columns:

 

List A:
Column:

Suppliers(Type: Lookup List B/Supplier Name)
PhoneNumber (Type: Number)
List B:
Column:

Supplier Name(Type: Single Line of text) and Phone Number(Type: Number)

 

When the user selects a particular supplier the phone number field will be populated based on the supplier selected.

The issue is the phone number is displayed in this format 96,112,312,312 which is wrong.
Capture.JPG
In PowerApps:
Capture.JPG
(The second column is how it should be displayed but this is a calculated column and I have no idea why it's returning blank when I map this column in the formula).

What I want to achieve is the following:

When the phone number is populated I want to display the phone number in this format (###)-##-###-### as it shows in the screenshot that I posted.

I have tried to use the following formula in the Default property of the Datacard (because it's on edit form) but it doesn't affect the results and it shows as a blank field.

 

LookUp(POSuppliers, Title = DataCardValue19.Selected.Value, Text(PhoneNumber, "[$-en-US](###)-(##)-(###)-(###)") )

 

What is the right formula that will display the phone number format that I mentioned?

Can someone please provide an example?

Any help will be greatly appreciated.
Thank you.

Categories:
I have the same question (0)
  • GarethPrisk Profile Picture
    2,828 on at

    The code you have to reformat the number column to a phone format is correct.

    However, phone numbers are inherently not numbers (could have leading 0's, typically have hyphens and parenthesis, etc.) Are you able to change your columns to store the phone numbers as strings/text? I realize this may not be possible, but it will save you potential hassle down the road.

     

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Julien2 ,

    Is the PhoneNumber field a Number type column in your SP List (List B)?

     

    Based on the formula that you mentioned, I think the formula that you mentioned is proper. I think this issue is related to the Format property of the Text Input box within the Tel data card.

     

    If the PhoneNumber field is a Number type column in your SP List, the Format property of the TextInput box within the Tel Data card would be set to TextFormat.Number in default. But the Text function returned is a Text value rather than a Number value, so the Tel Text Input box would show up Blank in your Edit form.

     

    As fixed solution, please change the Format property of the TextInput box within the Tel Data card to following:

    TextFormat.Text

    then the formatted Phone Number value would be displayed as below:

    3.JPG

     

    If the issue still exists, please modify your formula as below:

    Text(
     LookUp(POSuppliers, Title = DataCardValue19.Selected.Value).PhoneNumber, 
     "[$-en-US](###)-##-###-###"
    )

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

    Same problem I'm also facing, I have PhoneNumber field is Single line of Text type column in my SP List and I tried that approach which are you mentioned like "PhoneNumber" field Default property set as Text(Parent.Default,"[$-en-US]###-###-####")  (Because I want "123-345-4567" this format) but it's not working. Please advise me what kind of mistake I did.     

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard