Hi everyone,
I have a Gallery with a Sharepoint list as a source and want to show the profile picture of the user in that Gallery item that is mentioned in the list.
The formula: Office365User.UserPhoto("name.name@email.com") will show me a picture. But if I want to retrieve that email dynamically it wont work. This is the formula: Office365User.UserPhoto(Thisitem.Titel). In the field "Titel" the respective email is mentioned.
By the way I am using the german version so my formula is:
'Office365-Benutzer'.UserPhoto(ThisItem.Titel)
I have also a second field which is called "SendTo" where also a email address is mentioned. However this also does not work.
Thank you in advance.
Solved! Go to Solution.
Hi @NamegomJan ,
You can User Like below if you are using dynamics EMail ID.
Office365Users.UserPhotoV2(Text(User().Email)).
Thanks,
Vijay
Please click "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."-Vijay
Hi @NamegomJan ,
You can User Like below if you are using dynamics EMail ID.
Office365Users.UserPhotoV2(Text(User().Email)).
Thanks,
Vijay
Please click "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."-Vijay
Thanks. But this will show me the picture of the User using the app right? I don't want this. I want to retrieve a specific email address from a sharepoint list and show the picture of that user.
Hi @NamegomJan ,
Yes You can use like your Requirment.
ThiItem.TItle or whatever you want to pass.
Thanks,
Hi Vijay,
thanks. But unfortunately this does not work. I used this formula:
'Office365-Benutzer'.UserPhotoV2(Text(ThisItem.Titel)). It shows nothing.
Thanks
Hi @NamegomJan ,
Its working perfectly Fine for me -
see the below -
Office365Users.UserPhotoV2(Text(ThisItem.Title))
See the list reference for me -
Thanks,
Vijay
Please click "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."-Vijay
Hi Vijay,
thank you so much. It works. The problem was that the test user has no profile picture.
Is there a possibility to add the standard picture for those cases? And if I have no email address in that list but only the name of the user, is there still a possibility to get the profile picture?
Thanks!!
Hi @NamegomJan ,
In this case, you can Upload one user image in Media and DIsplay in the condition when users don't have a profile pic then you can display that one.
Code for Condition -
If(IsBlank(Text(Office365Users.UserPhotoV2(Text(ThisItem.Title)))),Office365Users.UserPhotoV2(Text(ThisItem.Title)),vvv)
see the Demo -
Thanks,
Vijay
Please click "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."-Vijay
Awesome great. It works. I encounter one more problem:
Office365Users.UserPhotoV2(Text(ThisItem.Title))
If Title is a name. Can I transform it somehow to the corresponding email address? Or is there another workaround to get the profile picture just from the name?
Thanks!
Hi @NamegomJan ,
YOu can use the below COde for this Purpose and implement the logic for retrieve email based on displayName.
below code use for this Purpose -
If(IsMatch(Text(ThisItem.Title), Match.Email), ThisItem.Title, "No EMail - here impliment the logic for retive email ID") //ThisItem.Title
Thanks,
Please click "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."-Vijay
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |