cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nealhicks1
Helper III
Helper III

Trying to convert user inputted numbers into phone number format in PowerApps form

Hello everyone,

 

Just as a disclaimer, I have been working on this issue for the past few hours, and have done extensive research and basically read through every bit of information I could find, but I am still having trouble.

 

I have a PowerApps form that is connected to a SharePoint Online list. We have a phone number field, and I am trying to basically transform the numbers people input into the US xxx-xxx-xxxx format. I've tried using a bunch of different TextFormat.Number related modifications, but to no avail. I've also tried converting the input method/type to Text, and using TextFormat.Text=Text(Value(DataCardValue6),"[$-en-US](000)-000-0000").

 

Anyways, I'll be incredibly grateful for any help that anyone can provide. Thank you so much in advance! 

 

Edit: I've also tried TextFormat.Text=Text(Value(DataCardValue6.Text),"[$-en-US](000)-000-0000"). And a lot of variations on this. I keep getting exceptions, so I obviously don't know what I'm doing. 🙂

11 REPLIES 11

My phone field in SharePoint is set to text entry. Here is the Text display Value in PowerApps:

 

"("&Mid(DataCardValue39.Text,1,1)&Mid(DataCardValue39.Text,2,1)&Mid(DataCardValue39.Text,3,1)&") "&Mid(DataCardValue39.Text,4,1)&Mid(DataCardValue39.Text,5,1)&Mid(DataCardValue39.Text,6,1)&"-"&Mid(DataCardValue39.Text,7,1)&Mid(DataCardValue39.Text,8,1)&Mid(DataCardValue39.Text,9,1)&Mid(DataCardValue39.Text,10,1)&" (Cell)"

 

This does not control the input mask for the phone field on the form- I am repurposing it on a review/confirmation screen prior to the user submitting the form. Hope this helps in some way.

Hi Can you help implementing the second way, where I accept any reasonable input (like 1234567890) and convert it to (123)-456-7890 when updating the SP list.
Thanks for your help.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,055)