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 / Phone Number Auto form...
Power Apps
Answered

Phone Number Auto formatting not working in PowerApps form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I have PhoneNumber field is Single line of Text type column in my SP List, When I enter 10 value in this field it's automatically change format like "###-###-####" as below screen shot,

TSundar_0-1622528673850.png

 .I have tried to use the following formula in the Default property of the Datacard Text(Parent.Default,"[$-en-US]###-###-####") like as below screen shot,

TSundar_1-1622528866007.png

 

But it doesn't affect the results as highlighted results

TSundar_2-1622528945536.png

 

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:
  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous try this,

    Text(Value(Parent.Default),"[$-en-US]###-###-####") 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Do you want the input number to be formatted as you expect once you input something?

    Could you please share a bit more about the scenario?

    Actually, the Text input control could not display the text string as a formatted way once you input.

    In other words, the formatted text string will not display in real time.

    I have a similar thread here you could check for reference.

    Set the OnChange property of the Text input as below:

    Set(VarPN,Text(Value(DataCardValue8.Text),"[$-en-US]###-###-####")) 

    Set the Default property of the Text input as below:

    VarPN

    Once you input something different, the Text input control will display the number as the phone number format.

    v-qiaqi-msft_0-1622535799910.png

    Regards,

    Qi

     

     

     

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous Just wondering, if my solution worked for you 🤔.

     

    Please remember to give a 👍 and accept the solution as it will help others in the future.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so match, your solution is working for me and it's really valuable 

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous Glad to help!

  • Habeebroshni Profile Picture
    2 on at

    Hi,

     

    I also have the similar type of problem ,

    I have Set variable on my OnChange action :

    Set(Cl2varroundvalue,RoundUp((inptDT1Shaft3cl2.Text),2));

     

    Now iam trying to convert the variable as Text :

    Text(Cl2varroundvalue,"[$-en-US]0.00")

     

    This is getting converted to text as expected which allows two zeros, and if trailing zero if necessary.

    Now the problem is when iam trying to the same Text format in a If condition or switch that doesnt work for me.

     

    Is there any mistake iam doing? Please let me know.

     

    If(Mode="Edit",LookUp(T_DailyData,DailyDataID=SelectedDatatableValues.DailyDataID).Shaft3CL2,

    Text(Cl2varroundvalue,"[$-en-US]0.00"))

  • krishFE Profile Picture
    3 on at

    It works !! Thanks for solutions.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard