web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Shoutout Template - Su...
Power Apps
Answered

Shoutout Template - Suppress Error Message When User Has No Picture

(1) ShareShare
ReportReport
Posted on by 365
Hello,
 
I am using the Shoutout template and get the following error when searching for a user. The error appears in the SearchPersonScreen Gallery under the ImageUser_1.
 
The code is:
 
//check if app already cached user photo in MyRelevantPeople collection, then check whether user has photo, and retrieve it from Office365Users
If(ThisItem.Id in MyRelevantPeople.Id, LookUp(MyRelevantPeople, Id = ThisItem.Id).Photo, Office365Users.UserPhotoMetadata(ThisItem.Id).HasPhoto, Office365Users.UserPhoto(ThisItem.Id), 'profilepic-generic-user')
 
 
 
 
 
How can I fix, suppress, or disable this error message from popping up? I saw people saying to put "" in the OnError property to suppress the error; however, I still see the error message appear.
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    Probably a bit over overkill as I do not know which argument is generating the error, but try this
    If(
       ThisItem.Id in MyRelevantPeople.Id, 
       IfError(
          LookUp(
             MyRelevantPeople, 
             Id = ThisItem.Id
          ).Photo, 
          'profilepic-generic-user'
      ), Office365Users.UserPhotoMetadata(ThisItem.Id).HasPhoto, IfError( Office365Users.UserPhoto(ThisItem.Id), 'profilepic-generic-user'
    ​​​​​​​ ), 'profilepic-generic-user' )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard