cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shabilass
Helper II
Helper II

Images in gallery are not displayed in Mobile PowerApps.

Dear All,

 

I have an app that stored capture/upload images in SharePoint library and save the images in SharePoint list as a hyperlink. I retrieved back the images in PowerApps by calling the hyperlink from the list. Can refer here how I stored my images in library and list: https://powerusers.microsoft.com/t5/Building-Power-Apps/Save-image-captured-from-camera-in-SharePoin...

 

In my PowerApps, I have one screen that display images in gallery (retrieved the images from the list).

 

My problem here is the images are only display in PowerApps Studio, but when i open the app using mobile PowerApps, the images in the gallery are not showing.

Anyone have ideas to solve this issue?

 

Thank you in advance!

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @shabilass ,

OK, adjust the code as follows.

LookUp(
    'Library Name',
    'File name with extension' = Substitute(Last(Split(ThisItem.Picture,"/")).Result,"%2E",".")
).Thumbnail.Large

 Hope this helps.

Sik

View solution in original post

Hi @shabilass ,

 

The Picture is the Hyperlink column of the list, right? Have you changed the column name ever?

It seems you apply the formula to the image in the gallery, what is the Items property of Gallery?

 

@WarrenBelz 's idea is good, reference the file by LookUp column, rather than hyperlink column, then you can refer to the Thumbnail of file more easily. But this require to re-construct your list.

Sik 

View solution in original post

14 REPLIES 14
WarrenBelz
Super User III
Super User III

Hi @shabilass ,

You can display photos from either attachments or a SharePoint document library on Apple and Android devices easily.

If from a SharePoint Library - in a Gallery  the Image control Image property is 

ThisItem.'{Thumbnail}'.Large

For a Standalone picture on the form

GalleryName.Selected.'{Thumbnail}'.Large

 (you can also use Small and Medium

For an Attachment in a gallery with Items showing attachments for selected item - Items of Gallery

GalleryName.Selected.Attachments

Image property in gallery

ThisItem.Value

For standalone picture

GalleryName.Selected.Value

To show the first attachment on a form

First(GalleryName.Selected).Value

We do this with thousands of pictures in the field and it works very reliably.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz 

I have try it, but the image still not appear. Just for your information, the picture is stored in SharePoint list with column name "Picture".

 

Previously I used ThisItem.Picture, but it only works on PowerApps Studio but not in mobile PowerApps.


Any idea on this?

 

shabilass_0-1596002243202.png

 

shabilass_0-1596004101756.png

 

 

Hi @shabilass ,

Is that a gallery or a Form the image is stored in? You have also mentioned a List - I assume you mean a Gallery.

The below is a Gallery based on a Library (no filters or any other code in the Items)

ThumbNailPhoto.jpg

When you say stored in a list with a field name, do you mean you have stored it in Base64 Text in a Multi-Line Text field. If so, you just need ThisItem.FieldName as below (ThisItem.Picture) - although Picture is a bad name for a field.

MultiLineImage.jpg

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

v-siky-msft
Community Support
Community Support

Hi @shabilass ,

 

This is a known issue that some hyperlink image cannot display in mobile.

If the hyperlink links to SharePoint Library, the workaround is to LookUp the file thumbnail from the sharepoint library.

first thing is to extract the file name from the hyperlink stored in the list if the hyperlink looks like this:

Snipaste_2020-07-29_14-40-34.png

Substitute(Last(Split(First(Split(ThisItem.HyperlinkColumn,"&parent").Result).Result,"%2F")).Result,"%2E",".")

Then lookup the file thumbnail from the sharepoint library based on the file name. set image property as follows.

LookUp(
    'Library Name',
    'File name with extension' = Substitute(Last(Split(First(Split(ThisItem.HyperlinkColumn,"&parent").Result).Result,"%2F")).Result,"%2E",".")
).Thumbnail.Large

Hope this helps.

Sik

Hi @v-siky-msft 

 

May I know where should i put this code on? Does both code have be in the same property?

 

shabilass_0-1596005737867.png

 

shabilass_1-1596005754603.png

 

Thank you.

Hi @shabilass ,

 

The substitute formula is to show you how to extract the file name from hyperlink, and it has been applied in the LookUp formula to match the filename.

You just need to put the following code to the Image property of image control in the form.

 

LookUp(
    'Library Name',
    'File name with extension' = Substitute(Last(Split(First(Split(ThisItem.Picture,"&parent").Result).Result,"%2F")).Result,"%2E",".")
).Thumbnail.Large

 

If this doesn't work, please share the hyperlink to let us know the how is the hyperlink defined.

Sik

@shabilass ,

Please tag me if you want further help - three way conversations just confuse everyone.

Hi @v-siky-msft 

I have tried it and get error like this:

shabilass_0-1596007782639.png

 

Fyi, this is the image library looks like:

shabilass_1-1596007856197.png

 

And this is how my SharePoint List that have "Picture" column in. The picture column is hyperlink type.

shabilass_3-1596008135962.png

 

 

Hi @WarrenBelz 

 

Basically, the images come from camera in PowerApps and I used Power Automate parse JSON function and save the image in document library (I named it "Images library").

I have another 1 list that have a column "Picture" (hyperlink type). This hyperlink stored the image link from the document library.

In PowerApps, I have 1 gallery that display the data from the list include the image from the "Picture" column. Now in this gallery, I can view the image in PowerApps studio, but not in PowerApps in mobile. I have used ThisItem.Picture on this, but it doesn't show on mobile.

 

Hope you understand this scenario. Thank you for your time and help!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (59,057)