Hi Members,
I had a requirement in Power Apps to display Office 365 User Profile Picture.
I have a SharePoint list that has various columns like:
- Employee ID = Title
- Employee Name = Person or group
- Employee Department = Choice

On my Power Apps screen, I need to display the employee details in a gallery control.
There, I need to display their profile picture, but some of the Office365 users don't have their profile picture; in that situation, I need to display their initials. How can I achieve this?
I tried with the code below, but it's not working. It's not even showing the other pictures.
If(
IsBlank(Office365Users.UserPhotoV2(ThisItem.'Employee Name'.Email)),
Concatenate(
Left(ThisItem.'Employee Name'.DisplayName, 1),
If(
Len(ThisItem.'Employee Name'.DisplayName) > Find(" ", ThisItem.'Employee Name'.DisplayName),
Left(Mid(ThisItem.'Employee Name'.DisplayName, Find(" ", ThisItem.'Employee Name'.DisplayName) + 1), 1)
)
),
Office365Users.UserPhotoV2(ThisItem.'Employee Name'.Email)
)

Can anyone please suggest how I can achieve this? Thanks in advance!