In my table I have a field "username" that field gets the values of my PowerAPP user = User()FullName, for every record added I get the person name.
What I would like to add is in the gallery show the name and also the person who submitted the record "Picture"
I have been trying different methods but none of them works.
My Userfield name is "Initials"
Is this correct?
And BTW if no the user has no picture I would like to show NO Picture or Empty image.
thanks in advance
Here is an example of a formula I use in an Image control to get a user's photo. In my example I have a field called cboPeoplePicker where a user is selected and then an Image control that display's the user's photo. You should be able to make a few minor changes to the formula to get it to work in your situation.
If(IsBlank(cboPeoplePicker.Selected.Mail), SampleImage, If(Office365Users.UserPhotoMetadata(cboPeoplePicker.Selected.Mail).HasPhoto = true, Office365Users.UserPhoto(cboPeoplePicker.Selected.Mail), SampleImage ) )
You need the mail address of the user you want to display the photo. In my case my field (cboPeoplePicker) was a people picker, so the selected user had a mail property I could use. If I only needed the current user's mail address I could use "User().Email" instead of "cboPeoplePicker.Selected.Mail".
Thanks again. Well still nothing.
Sorry. again I am trying to show the picture of each person who submitted an especific record in a gallery.
I don't kow what I am doing wrong.
Sorry to be a pain!!
Hello there, I have been playing with this formula for almost 4 hours, but unfprtunately nothing.
Let me recap my situation:
My APP is connected with an SPL, I have in that list a field named "Initials" that field is = User().FullName, so in my share point point list I have recorded each record an at the end the column initials "Name and Last Name".
Now I would like to ADD to my Gallery the picture of the person who submitted that record using that Field "Initials"
Is this possible to do this using your formula?
Here is what I am using but I am getting "Invalid Argument Type"
If(Office365Users.UserPhotoMetadata(User().Email).HasPhoto = true,
Thanks in advance for any response.
I just put the code in your post into an image control and it displayed my picture without any errors.
If(IsBlank(User().Email), SampleImage, If(Office365Users.UserPhotoMetadata(User().Email).HasPhoto = true, Office365Users.UserPhoto(User().Email), SampleImage ) )
thank you very much for your follow up.
for me is not working:
I was working on a different solution but is not working also:
Because I am collecting User().FullName, I have created a new Sharepoint list with two columns
Users and Email
User has the Fullname, and email their email address.
I was planning to have a text field with a VLookup function something like:
but that is not working also, and after that insert your proposed image field
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.