cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3m
Regular Visitor

Employee Phone number missing

Hi,

 

In my powerapps I am using office365user as a datasource. I added below code to display user phone extension number but nothing showing whereas if I use .MobilePhone it does show use mobile no. What I am doing wrong? I have tried to use .BusinessPhones but still no luck. I can see user extension no through office365 mail.

 

Any help will be appreciable.

 

If(IsBlank(First(Employeeprofile).TelephoneNumber),"-",First(EmployeeProfile).TelephoneNumber)

 

Thanks

Mohammad

37 REPLIES 37

I also tried to use your code in the OnSelect section and it produces an error on the ".Value" 

 

Launch("tel:"&(Office365Users.UserProfile("mbailey@dornier.com").BusinessPhones).Value)

 

This is the original code:

 

Launch("tel:"&First(EmployeeProfile).mobilePhone)

@mbailey218- I think you are missing a First in the formula:

 

Launch("tel:"&First(Office365Users.UserProfile("mbailey@dornier.com").BusinessPhones).Value)

 

mikel
Frequent Visitor

For other users I used First(Office365Users.UserProfile(ThisItem.Mail).BusinessPhones).Value
jnebben
Frequent Visitor

This is what worked for me: 

First(Office365Users.UserProfile(First(EmployeeProfile).Mail).BusinessPhones).Value 

it returns my phone number

jnebben
Frequent Visitor

Are you looking at your profile when it returns your number? It returns the correct number for the user profile in my app

so what it really turned out to be (this is the org browser after all) is :

 

First(Office365Users.UserProfile(TextBox1_26).BusinessPhones).Value  (where the textbox is displaying the value of the email address.

 

Is there a data list browser?  to see what fields are available in the UserProfile object for example?

 

jnebben
Frequent Visitor

Iv'e found a number of different ways to return the data i need but i can't get past this error: 

Office365Users.UserProfile failed: The method 'User Profile' has an invalid parameter for 'userId' 

 

These are just a few that work but still throw the error: 

If(!IsBlank(EmployeeProfile.BusinessPhones), First(Office365Users.UserProfile(TextBox1_26).BusinessPhones).Value)
 First(Office365Users.UserProfile((First(EmployeeProfile).UserPrincipalName)).BusinessPhones).Value)
First(Office365Users.UserProfile(TextBox1_26).BusinessPhones).Value 

yes.  I'm down to that error as well.

jnebben
Frequent Visitor

If there is a way to suppress the error that would work as well. The app is working like it needs to now, i just cant roll it out with that error popping up

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (72,960)