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

Notifications

Announcements

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,710

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard