cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nani
Level: Powered On

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

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

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

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

6 REPLIES 6
Highlighted
Anonymous
Not applicable

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

like this?

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

Nani
Level: Powered On

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

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 

Power Apps Staff AndyPennell
Power Apps Staff

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

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

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

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

Nani
Level: Powered On

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

Hai Markus,

Thank you very much for your help.

 

Raj

Anonymous
Not applicable

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

@Nani

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

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,171)