cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mirtemir
Helper IV
Helper IV

Multiple mobile numbers in PowerApps

I am trying to show a personal mobile number and business mobile number from users. I retreive the numbers from the Active Directory. I use this formula, but i only show the first personal mobile number. How can I show the second mobile number?

 

If(IsBlank(First(EmployeeProfile).mobilePhone);"-";First(EmployeeProfile).mobilePhone)

 

5 REPLIES 5
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @Mirtemir ,

 

May be something like below will help in your case. 

 

If(IsBlank(First(EmployeeProfile).mobilePhone);"-";IsBlank(First(EmployeeProfile).TelephoneNumber);First(EmployeeProfile).mobilePhone;First(EmployeeProfile).mobilePhone&" "&First(EmployeeProfile).TelephoneNumber)


or 

If(IsBlank(First(EmployeeProfile).mobilePhone);"-";First(EmployeeProfile).mobilePhone&" "&First(EmployeeProfile).TelephoneNumber)

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

logixcrm
Helper I
Helper I

Hi Mirtemir

 

Question - do both phone numbers display on the user profile in columns (fields) or are they in a grid? the reasion I ask is because you are using a "First" expression which is normally used to to consider on the first record retrieved.

 

I am going to assume you want to show both mobile numbers in one field in a single input on a canvas app.

 

Firstly you should add an Office365User Connection.

 

Next create a add a label to get the UserID, for this you can user the following expression

logixcrm_0-1632836281588.png

 

Next add in input and use the following expression

 

logixcrm_1-1632837267999.png

Office365Users.UserProfile(Label7.Text).mobilePhone & " - " & First(Office365Users.UserProfile(Label7.Text).BusinessPhones).Value

 

I know this is not exactly what you are trying to do, however, once you are able to retrieve the data you can then write an If expression to manage how the data is displayed.

 

I hope this helps.

logixcrm
Helper I
Helper I

Hi Mirtemir

 

Question - do both phone numbers display on the user profile in columns (fields) or are they in a grid? the reasion I ask is because you are using a "First" expression which is normally used to to consider on the first record retrieved.

 

I am going to assume you want to show both mobile numbers in one field in a single input on a canvas app.

 

Firstly you should add an Office365User Connection.

 

Next create a add a label to get the UserID, for this you can user the following expression

logixcrm_0-1632836281588.png

 

Next add in input and use the following expression

 

logixcrm_1-1632837267999.png

Office365Users.UserProfile(Label7.Text).mobilePhone & " - " & First(Office365Users.UserProfile(Label7.Text).BusinessPhones).Value

 

I know this is not exactly what you are trying to do, however, once you are able to retrieve the data you can then write an If expression to manage how the data is displayed.

 

I hope this helps.

Hi, it did not get what i am after. I am trying to get these numbers. I would like to show the Homenumber (if there is one) and the Mobile number. nummers.png

Mirtemir
Helper IV
Helper IV

Well, i could not get this to work. So, i'll pause it for now and try again later.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,622)