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
Anonymous
Not applicable

Did you figure out how to suppress the error?
Mark_Thomas
New Member

Down to same error.  Has anyone solved?

I was able to resolve this by creating a drop down field and setting the Items property as "First(EmployeeProfile).BusinessPhones". 

I haven't gone back to it.  It appears like it is some sort of initialization issue, where the user isn't known when the app starts.

Unfortunately @LeSmanSP creating that drop down menu did not work for me... I'm still getting the error "Office365Users.UserProfile failed: The method 'UserProfile' has an invalid value for parameter 'userId'" whenever the app is started 😞

 

I created the drop down menu on the initial employee directory search page and set the visibility to False.

 

Any other suggestions?

 

Ok, hope this helps anyone else who is going crazy trying to get this working.

 

I created a drop down menu as described below, but as my text I put: First(Office365Users.UserProfile(First(EmployeeProfile).UserPrincipalName).BusinessPhones)

 

This loaded the array at initialisation and I'm no longer getting the error at application start.

JeromeK
Regular Visitor

The information is stored in the BusinessPhones collection. 

 

So you can set the "Text* property to the following formula: If(IsBlank(First(First(EmployeeProfile).BusinessPhones).Value),"-",First(First(EmployeeProfile).BusinessPhones).Value)

 

and the OnSelect action should be: 

Launch("tel:"&First(First(EmployeeProfile).BusinessPhones).Value)

 

First(Office365Users.UserProfile("AnotherUser@contoso.com").BusinessPhones).Value

Will this formula only work for the user whose email is in place of "anotheruser@contoso.com"? If so, what should I put in place of that example email in order for the business phone number to show up for each user that accesses the app?

 

Thanks!

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 (53,636)