web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Image not showing resu...
Power Apps
Answered

Image not showing result when datasource is collection

(0) ShareShare
ReportReport
Posted on by 198

I have a SharePoint document library where a few (<30) images are stored which will be used in a powerapp, for instance for icons.

For flexibility and performance I want to load these images in a collection at app start. And refer to them further on in the app using this collection. When other images are needed in the app only the image files need to be changed and not the app. 


Although PowerApps does not give any errors or warnings this configuration does not work.

 

When I put a gallery on a screen where its items property =  SP_DoclibrayName and an Image control in that gallery with its Image property = ThisItem.Thumbnail.Lage the image is displayed.

But when I change the items property of the gallery to a collection which is filled at app start with ClearCollect(colImages,FirstN( SP_DoclibrayName,10)) the images (or any other data) do not show up.

 

One thing: the language of the SharePoint site is Dutch. Therefore I cannot refer to ThisItem.Thumbnail.Lage but i have to use ThisItem.Miniatuur.Large 


Any help would be much appreciated

Categories:
  • eka24 Profile Picture
    20,925 on at

    If the pictures are 30 or less and will not be changing regulary, i suggest:

    1. Import the individual pictures in powerapps

    2. Create a collection OnStart of the App:

    ClearCollect(

        PicCollection,

        {ID:1, Image: MyPic1},

        {ID:2, Image: MyPic2},

        {ID:3, Image: MyPic3},

        {ID:4, Image: MyPic4},

        {ID:5, Image: MyPic5},

        {ID:6, Image: MyPic6},

        {ID:7, Image: MyPic7},

        {ID:8, Image: MyPic8},

        {ID:9, Image: MyPic9},

        {ID:10, Image: MyPic10})

     

    3. In the image inside the GALLERY, do a lookUp:

      LookUp(PicCollection,ID=ThisItem.YourColumnSameName,Image)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • KrishnaV Profile Picture
    5,023 on at

    Hi @BartSchaap ,

     

    In Collection everything will store as string when you create collection as 
    clearcollect(collSample,documentlibname)

    Please try this:
    onStart of the APP

    Clear(collSample);
    ForAll(Documents,Collect(collSample,{docID:ID,URL1:"https://abc.sharepoint.com/sites/Practice/"&'Full Path'}))

     now image property:

    ThisItem.URL1

    see the prototype I have created for you:
    image in Gallery from SHP.png


    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @BartSchaap ,

     

    It's more like that the OnStart property hasn't been triggered, so all collection data is not generated.

    If so, please try to click the Run OnStart button in ellipsis.

    Snipaste_2020-07-07_11-17-27.png

    Hope this helps.

    Sik

  • BartSchaap Profile Picture
    198 on at

    Hi @eka24 ,

    This is a nice suggestion and would certainly work. But the thing is I want to load the images from SharePoint and not import them permanently in the app. The reason for this is that we want to make the app fully configurable. We want to release one version and do customization's by manipulation the content in the SharePoint Doc library and SharePoint lists. 
    See my note on the original post about this issue

  • BartSchaap Profile Picture
    198 on at

    Hi @v-siky-msft  sometimes it can be as simple as that indeed but alas that is not the case

  • Verified answer
    BartSchaap Profile Picture
    198 on at

    Hi all who replied, thanks a lot!
    I found something interesting and the good news is: now it does work.

    I am not completely sure if it was a hick-up by PowerApps but when I first add a gallery without an image in it, run the app, it shows data as expected. When I add an image control to the gallery after it has run once successfully the image is shown. 

     

    These are my settings:
    App.OnStart = ClearCollect(colImages,RR_ImageLib   (RR_ImageLib is the name of a SharePoint document library)

    On Screen 1:

    Gallery1.Items =  colImages

    In Gallery 1:
    Label1.Text = ThisItem.Name

    Image1.Image = ThisItem.Miniatuur.Large  ( Miniatuur = Dutch for ThumbNail, language for my SP site = Dutch)

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard