cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aladin
Level: Powered On

User Picture in Gallery

Hi All,

Happy New Year to the whole Community! May 2019 bring its lot of personal & professional achievements!

I've an issue I've been struggling with for a few weeks: when it comes to displaying the picture of the different users in the Gallery, the pictures are shown correctly in the Editor but on the smartphones there is only an empty box where the picture shall appear, no picture and no error reported...

I'm using a ThisItem.'Created By'.Picture to get the picture of the different users in the Gallery. I also tried using the Office365Users UserPictureV2 but I get errors in this case while everything's working just fine in the Editor view with the ThisItem.'Created By'.Picture.

Any hint on this issue?

Thanks for your support! 

1 ACCEPTED SOLUTION

Accepted Solutions
h-nagao
Level 10

Re: User Picture in Gallery

if any suggestions not shown, the connection is not registered as datasource for This App.
*Connected means available to add as datasource to each apps. When we use functions of connectors, we have to add the connection as datasource of each apps.
To add as datasource,
Click Content—>Data sources and choose Add data source on the data sources panel. Click New Connection and select Office365 Users connector
11 REPLIES 11
h-nagao
Level 10

Re: User Picture in Gallery

I was in same situation and found workaround as ; If(!IsBlank(ThisItem.'Created By'.Email),Office365Users.UserPhotoV2(ThisItem.'Created By'.Email)) This avoids any error messages and make user photo visible :-) Thanks,
Aladin
Level: Powered On

Re: User Picture in Gallery

Hi,

Thank you for your reply, however as mentioned in the post I tried the UserPhotoV2 function put PowerApps reports it as an unsupported function...

Any other hint?

h-nagao
Level 10

Re: User Picture in Gallery

Hi,

How about the function UserPhoto?

If this also put same error, Could you please share a bit more about the Gallery control within your app?

 

Just Info, I assumed that the data source is some SharePoint List, and I dont get any errors using UserPhotoV2 as attached.

 

Aladin
Level: Powered On

Re: User Picture in Gallery

Hi h-nagao,

Thanks for the quick reply. I've been using both UserPhoto and UserPhoto2 functions (I got some guidelines on various PA forums accordingly) but I got in both cases the same error.

I indeed use a "standard" Gallery generated from a SharePoint List to display few data on each item, including the Creator of each item as a list in my gallery. There is nothing more on this very screen, except a variable defined on 'onvisible' that I use for potential filters.

But really the weirdest thing about it is that in the editor view in PA I'm getting all the pictures (even the blank ones) just nice in the gallery, it's only when it comes to displaying the gallery on a phone that the issue arises. Funny fact though: while lauching the app from my computer (not through the editor, but "open" it from my browser) I can see the pictures of the users that were displayed in my editor view just before, but not the other users - I guess it about the cache.

Aladin
Level: Powered On

Re: User Picture in Gallery

Herewith attached the error message.

ERROR.PNG

h-nagao
Level 10

Re: User Picture in Gallery

Thank you for sharing error, and sorry for late response.
I may figure out cause of problem, but to make sure, could you share screenshot of your data source list?
Aladin
Level: Powered On

Re: User Picture in Gallery

Hi, thanks for your reply.

Herewith attached the screenshot of my datasource list.

h-nagao
Level 10

Re: User Picture in Gallery

Thank you.
Your error message tends to be shown when the datasource is not recognized by app.
If you directly fully inputed expression as I wrote, could you try once again as;
1. Remove all text from Image property
2. Type Office , and select function from suggestion
3. input ThisItem....
h-nagao
Level 10

Re: User Picture in Gallery

if any suggestions not shown, the connection is not registered as datasource for This App.
*Connected means available to add as datasource to each apps. When we use functions of connectors, we have to add the connection as datasource of each apps.
To add as datasource,
Click Content—>Data sources and choose Add data source on the data sources panel. Click New Connection and select Office365 Users connector