cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
echodapogi
Frequent Visitor

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
pontusofsweden Resolver III
Resolver III

Re: PowerApps Error Handling

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
WarrenBelz Community Champion
Community Champion

Re: PowerApps Error Handling

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.

pontusofsweden Resolver III
Resolver III

Re: PowerApps Error Handling

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,139)