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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display a picture in a...
Power Apps
Answered

Display a picture in a gallery from a sharepoint list - how to add new pictures?

(0) ShareShare
ReportReport
Posted on by 1,097

i have a sharepoint list as datasource

i have set the attachment column in the datasource to only allow one uploaded file.

 

I want to display this uploaded file in a gallery that have the datasource in ITEMS property.

 

how to do this? i cant figure out how to load that file in an image controle?

 

i have tried use the powerapps control "add image".... but then i cant figure out how to save that picture to the datasource.

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Oskarkuus 

    If you only have one attachment in the attachments that you want to display, then you can put an Image control in your Gallery and set the Image property to First(ThisItem.Attachments).Value

    That should display it.

     

    I hope this is helpful for you.

     

  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @Oskarkuus ,

    Could you tell me whether you have problem about displaying attachments in your gallery or updating your attachments?

    1)how to display attachments in your gallery

    If one item only has one attachment, you could set like this:

    gallery's Items:

    listname

    image control's Image:

     First(ThisItem.Attachments).AbsoluteUri

    Just like this:

    101.PNG

     

    If one item has multiple attachments , you could set like this:

    gallery1's Items:

    listname

    gallery2's Items:

    Gallery1.Selected.Attachments

    Image control's Image (inside gallery2):

    ThisItem.AbsoluteUri

    Just like this:
    1011.PNG

     

    2)How to update attachments?

    I'm afraid it's not supported to update attachments by using add picture button.

    You could only use attachments control to update attachments. What's more, attachments only work inside a form and should be updated by using SubmitForm() function.

    You should set like this:

    gallery's Items:

    listname

    insert a form to upload attachments

    set the form's data source to the same list

    set the form's Item:

    Gallery1.Selected

    Only choose attachments in this form

    set the attachments control's OnAddFile:

    SubmitForm(Form2)

    set the attachments control's OnRemoveFile:

     

    SubmitForm(Form2)

     

    Then after you select item in the gallery, you could upload file in that form.

    Just like this:
    101.gif

     

     

    Best regards,

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @v-yutliu-msft 

    As long as you're not planning to use this on mobile devices it would work.  Otherwise, use the Value as in the formula I provided.

  • Powerplatform01 Profile Picture
    386 on at

    Hi,

    You can watch this video to resolve your issue

    https://youtu.be/pXLFmX7cxUc

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard