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!
Solved! Go to Solution.
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
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
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?
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)
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.
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 @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:
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?
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
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:
Fyi, this is the image library looks like:
And this is how my SharePoint List that have "Picture" column in. The picture column is hyperlink type.
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!
User | Count |
---|---|
254 | |
250 | |
82 | |
44 | |
27 |
User | Count |
---|---|
343 | |
266 | |
126 | |
61 | |
58 |