Friday, March 16, 2018

How to display images from a SharePoint library in PowerApps

[Update: As mentioned in the comments by Paul Culmsee, this only works in the web version of PowerApps - not on devices. To make it work on devices take a look at his posts for a proxy workaround]

A while back I wrote a post about how to save images from PowerApps to SharePoint via Flow. Today  I got a comment asking how you can show images sored in a SharePoint library in a PowerApp. Turns out it’s not hard at all.

I first created a new document library named “Images” in a SharePoint site and uploaded two images.

image

Within your PowerApp add a new data source, and manually type in the name to the library containing your files, in my case “Images” and hit “Connect”. The manual typing is the crux to make this work.

image

Next add a gallery to your app and bind it to the Images data source. For the Image control, change the binding to be ‘{Link}’ and you should see your images showing up in the gallery.

image

Happy PowerApping!

7 comments:

  1. Hi mate

    I would love to be proven wrong here... but does this work on devices for you? My testing shows it does not because of the authenticated SharePoint URL's. I had to use these approaches to have this work across all devices. Both have a couple of disadvantages through...

    http://www.cleverworkarounds.com/2017/09/22/a-lesser-known-but-really-important-update-to-powerapps/

    http://www.cleverworkarounds.com/2017/09/29/its-not-a-proxy-its-a-floxy-a-way-to-display-sharepoint-pdfs-in-powerapps/

    ReplyDelete
    Replies
    1. I could say yes, but I'd be wrong - certainly fails on my mobile device. So we need a proxy of sorts then :(

      Delete
  2. Hello, I created an image list and linked it to my Power App, and a looks good when I test and play it on my desktop, however the images wont show on My ios devise? Any Ideas why the picture will not show on a mobile devise?

    ReplyDelete
  3. Hi Mikael, apologies for resurrecting this post but I have come up with a solution to display the SharePoint images on a mobile devices. Basically convert them to URIs..I blogged about it here https://www.bruce365.com/2018/10/11/display-sharepoint-images-on-mobile-devices-in-a-canvas-powerapp/

    ReplyDelete
    Replies
    1. Nice solution :) but requires one external component. One day we can do it all natively I'm sure.

      Delete