Hi Power Apps Community,
Issue: I am using a Gallery to display attached images from a SharePoint list using the following formula:
First(ThisItem.Attachments).AbsoluteUri
As seen below, when developing in the Power Apps studio - web browser, the image for Product A is displayed accordingly.
However, when I publish the app and display it on the mobile view, I get a blank image - as seen below.
Been spinning my head around this. Would really appreciate any help on this.
Thank you in advance 🙂
Does it work on mobile app?
On your side, please consider modify your formula as below:
First(LookUp('Your SP List', ID = ThisItem.ID).Attachments).Value
Firstly, please tag whoever you want to respond here - three way conversations just confuse everyone.
The code First(ThisItem.Attachments).Value placed in an Image control in a custom card in the form will certainly show the first image in your attachments.
You have already said you are using a gallery, which will have an Items property to show all attachments from the selected item (I assume you have already got this set). The image within this gallery will simply be ThisItem.Value.
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.
Yes!!! This worked! Thank you so much for the assist 🙂
You and @WarrenBelz keep up the great work.
Hi @Data_Enthusiast ,
Do you save your SP List records into a collection in your canvas app?
Do you connect the Gallery to your collection?
It is an known issue with collection -- when saving SP list records into a collection, the Attachments field would not be saved into this collection.
On your side, please consider modify your formula as below:
First(LookUp('Your SP List', ID = ThisItem.ID).Attachments).Value
Please take a try with above solution, check if the issue is solved.
Best regards,
Thank you for the responses.
@WarrenBelzand @v-xida-msft I had to reference my SharePoint List as a Collection - received delegation warning for size limit.
When I try to reference the Attachments using: First(ThisItem.Attachments).Value I get an error "Name is not valid. This identifier is not recognized"
When I try the ThisItem.Thumbnail.Large I do not get a image back.
Thanks for the clarification @v-xida-msft
That (plus more) is in my post I linked in the response.
@Data_Enthusiast , you can deal with either Gallery items with the .'{Thumbnail}'.Large reference or Attachments with the .Value reference.
Both work fine on mobile devices.
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 @Data_Enthusiast ,
It is an known limit with images files stored in SP Site -- Pictures that need authentication on SharePoint are not supported yet in Mobile device.
Actually, there is something wrong with the formula that you provided. If you want to display the Attachment image within your canvas app, you could not use .AbsoluteUri, instead, you should type the following formula within the Image property of Image control:
First(ThisItem.Attachments).Value
Note: The above formula would return a Blob data rather than a URL Link (which needs authentication to access).
Please consider take a try with above solution, then re-publish your canvas app, check if the issue is solved.
Best regards,
Hi @Data_Enthusiast ,
It is not really a limitation and you do not need clunky workarounds- please read this post of mine.
We capture and display hundreds of photos daily on iOS and Android devices.
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.
This seems to be a known limitation when referencing URLs of images in SharePoint with the direct URL... 🤯
There are some workarounds like getting the imageDataURI to reference: https://www.bruce365.com/2018/10/11/display-sharepoint-images-on-mobile-devices-in-a-canvas-powerapp/ or showing images from SharePoint Libraries: https://www.techmikael.com/2018/03/how-to-display-images-from-sharepoint.html but I prefer that Microsoft would just fix or extend the authentication to SharePoint through Power Apps Mobile Client.