cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nani
Frequent Visitor

Formatting Phone Number i.e (###)-###-###

Hello guys,

I hope everyone is doing great !

This is Raj, Here I am working on App and I have a requirement to format the Phone number in such a way that (###)-###-####.

Will , Any one please help me in that . 

Thank you in advance,

Raj

2 ACCEPTED SOLUTIONS

Accepted Solutions
Anonymous
Not applicable

there is a different in view and edit, in view there is htmltext used.

but because there is showing ABC it seems a string/alphanumeric is used for phone type so Brackets and Plus/Minus can be saved with number. this "a href" is a web link with url. if you click the app for registered "tel:" opens.

i believe a formatted input control is on the wishlist.

maybe using 3 textinput boxes and make a new string with it, but its not user friendly.

you can add extra data area with your own components that not direct belongs your recordset if you will make tel. no. input.

 

Ashampoo_Snap_2016.12.06_19h18m29s_001_.png

View solution in original post

mdevaney
Super User
Super User

@Nani 
Yes, you can automatically format a phone number as the user types it by creating an “input mask.”  It’s amazing to watch the phone number dashes appear automatically as you type!  Check out this article to learn how.


Link to article:

https://www.matthewdevaney.com/power-apps-phone-number-formatting-in-a-form-input-mask/

powerapps-inputmask-forums.gif

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

like this?

Text=        Text(Value(TextInput1.Text),"[$-de-DE](000)-000-000")

Hai Markus,

Thank you very much for your reply,

 

As you mentioned in reply Text= Text(Value(TextInput1.Text),"[$-de-DE](000)-000-000") is it only for "Text" data type , or any other data types  like "Phone" . Because In my app I used Phone Datatype to PhoneNumber (Field).And it is Showing HtmlText instead Text. Will you help me with this scenario.

Thank you

Raj 

Markus' suggestion will only work for numeric fields.

 

PowerApps have no concept of a "Phone" data type. Your data source will be exposed such a field as either a Text or Number.

 

If it is Text then you can format it using the various string operators.

Anonymous
Not applicable

there is a different in view and edit, in view there is htmltext used.

but because there is showing ABC it seems a string/alphanumeric is used for phone type so Brackets and Plus/Minus can be saved with number. this "a href" is a web link with url. if you click the app for registered "tel:" opens.

i believe a formatted input control is on the wishlist.

maybe using 3 textinput boxes and make a new string with it, but its not user friendly.

you can add extra data area with your own components that not direct belongs your recordset if you will make tel. no. input.

 

Ashampoo_Snap_2016.12.06_19h18m29s_001_.png

Hai Markus,

Thank you very much for your help.

 

Raj

Anonymous
Not applicable

@Nani

ok, i hope i helped, i am new to powerapps myself since 2-3 weeks 🙂

DrJasonScalmato
New Member

The Air Mail Envelope on the Floor

mdevaney
Super User
Super User

@Nani 
Yes, you can automatically format a phone number as the user types it by creating an “input mask.”  It’s amazing to watch the phone number dashes appear automatically as you type!  Check out this article to learn how.


Link to article:

https://www.matthewdevaney.com/power-apps-phone-number-formatting-in-a-form-input-mask/

powerapps-inputmask-forums.gif

Bstanley
New Member

I must be missing something.  I did exactly as written and the phone number does not appear.  In fact after each digit is input, it disappears.  There is a problem with one of the formulas but i cannot figure it out.  Please Help!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,550)