
Announcements
I have about 5 screens and in each screen I have about 4-5 galleries in which I am displaying user image. But the problem is that each time I navigate to a screen or show a gallery the app is fetching the images of hundreds of users from the server which makes the app really slow. The formula I am using Is following.
If( !IsBlank(ThisItem.PersonFieldName.Email), Office365Users.UserPhotoV2(ThisItem.PersonFieldName.Email) )
I have tried to store the images in a collection and it is working in the web but when I use the app from MS Teams the images does not show.
What should I do to make the app work smoothly.
Hi @Anonymous :
I tried to save all users' pictures into a collection, and tested it with Teams, and it worked.
I've made a test for your reference:
1\Set the app's OnStart property to:
ClearCollect(
TheCollection,
AddColumns(
Office365Users.SearchUser(),
"UserPhoto",
If(
!IsBlank(Mail),
Office365Users.UserPhotoV2(Mail)
)
)
)
This formula may report an error, but it does not affect the use (because searchuser will return guest users, but userphoto will report an error when searching for guest users)
Best Regards,
Bof