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

PowerApps Error Handling

Hello there, 

 

I am hoping this group can help me on this Error Handling issues. 

I have a gallery that displays users Picture profile. 

Code:  Office365Users.UserPhoto(ThisItem.RequestedbyEmail) 

 

the problem is if the users has no picture it has an a long error message on top. (see attached image). How can i change the error message on top to be custom. Like ("Error due to users have no profile picture") like that message. 

 

Like, ifError(Office365Users.UserPhoto(ThisItem.RequestedbyEmail), Notify("Error due to No Profile Picture") -- sample code

 

Thank you so much

 

-Echo

 
1 ACCEPTED SOLUTION

Accepted Solutions
Resolver IV
Resolver IV

Hi!

 

I think the error message is thrown by the connector so it´s not much to do about that. However, when I tried at my end I found out that instead of using Mail as a parameter, using Id works better. I.e

Office365Users.UserPhoto(ThisItem.Id)

 

This won´t cause any errors even if the user has no picture.  My suggestion is to use Id instead AND add a dummy picture in case there is no picture of the user.

 

BR

Pontus

View solution in original post

2 REPLIES 2
Super User III
Super User III

Hi @echodapogi ,

I am not a user of this facility, but will have a go at it.

 

If(
   !isBlank(Office365Users.UserPhoto(ThisItem.RequestedbyEmail),
   Office365Users.UserPhoto(ThisItem.RequestedbyEmail)
)
    

 

This hopefully should return nothing if not there. You can also try !isEmpty

 

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

Resolver IV
Resolver IV

Hi!

 

I think the error message is thrown by the connector so it´s not much to do about that. However, when I tried at my end I found out that instead of using Mail as a parameter, using Id works better. I.e

Office365Users.UserPhoto(ThisItem.Id)

 

This won´t cause any errors even if the user has no picture.  My suggestion is to use Id instead AND add a dummy picture in case there is no picture of the user.

 

BR

Pontus

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

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

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (18,316)