Hello,
I am hoping to have profile pictures included in my app.
I have a gallery setup, which has rows of a unique identifier for each individual, with the unique identifier within a text label. I am hoping to combine this with "@companyemail.com" to be able to have the profile picture displayed of who the row is referring to which will be within what i believe is referred to as a nested gallery - or a screen that is displayed upon clicking a view profile button on my main screen.
Please could someone advise on what powerfx formula i would use to be able to do this?
Many thanks
Chris
Okay then you can check for both for the visible property of button
IsBlank(image) && infoPopup
Thanks,
Tiksha
Please click Accept as solution if this helped you solve your issue. This will help others find it more readily. It also closes the item. Please consider giving it Thumbs Up.
Sorry i realised i hadn't put the visible property of the button to the IsBlank part you had mentioned.
I wasnt able to do this as i have a variable in their named InfoPopUP to make the button appear when 'view profile' is selected.
How would i have both things in there?
Many thanks
Chris
Thank you so much @TikshaAggarwal !
It looks great now with the initials 🙂 The only issue now is the pictures no longer appear just initials for everybody, have i missed something?
Many thanks
Chris
Hi @Appy1 ,
As you were unable to see initials if no user image exists. I guess this is because you didn't add the button control on place of image. Set X & Y properties to ensure the button appears in exactly the same position as of image.
If a profile picture exists, the initials should not show so we check the photo with the IsBlank function in the Visible property of the button.
Visible:
IsBlank(User_image)
Add the following code to the text property of button as well.
Concatenate(
Left(Office365Users.UserProfileV2(SystemID2_lbl_1&"@email.com").givenName, 1),
Left(Office365Users.UserProfileV2(SystemID2_lbl_1&"@email.com").surname, 1)
)
PFA attached screenshot for reference
Note: Also make sure to input valid email of user.
Hope this helps.
Thanks both, i have given it a go and i can get the picture to show up but not the initials.
Please could you help with what i am doing wrong here?
Many thanks
Chris
This is my image property:
If(
!IsBlank(SystemID2_lbl_1&"@email.com")
And Office365Users.UserPhotoMetadata(SystemID2_lbl_1&"@email.com").HasPhoto,
Office365Users.UserPhotoV2(SystemID2_lbl_1&"@email.com"),
Concatenate(
Left(Office365Users.UserProfileV2(SystemID2_lbl_1&"@email.com").givenName, 1),
Left(Office365Users.UserProfileV2(SystemID2_lbl_1&"@email.com").surname, 1)
)
)
@Appy1 ,
If email from gallery is office account, you can use Office 365 user connector in the app to get photo.
I recommended you check this link first to have some understand about connector definition, and can use other connectors supported by Microsoft in the future.
https://learn.microsoft.com/en-us/connectors/office365users/#binary
Hi @Appy1 ,
If you want to show the current logged in user Profile Picture, Simple add following in Image property of image
User().Image
If you want to show the image of selected user who created the item from gallery, you can use this.
Gallery.Selected.'Created By'.Picture
I also recommend you follow the blog to add initials of name if no user image found.
Power Apps Display A User Photo Or Initials - Matthew Devaney
Hope this helps.
Please click Accept as solution if this helped you solve your issue. This will help others find it more readily. It also closes the item. Please consider giving it Thumbs Up.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1