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 / gallery.selected.attac...
Power Apps
Answered

gallery.selected.attachment on a form not working

(0) ShareShare
ReportReport
Posted on by 219

Hello Folks, 

 

I have an attachment data card within the form that has the formulas below 

 

Gallery1.Selected.Attachments

 

I also have a button to submit the form, but for some reason is not uploading the attachment. The gallery1 has an attachment and I want to mirror this attachment to a separate form so I can upload the same attachment to another SP list. 

 

Anyone knows why is not uploading the attachment despite the gallery has an attachment?  

 

 

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

    Hi @ntt56k4 

     

    Did you check the gallery is same name and the form item property 

  • ntt56k4 Profile Picture
    219 on at

    yes is the correct gallery and item property is set as gallery.selected.attachment. I even see the filename in the attachment control and it will open the PDF file on a browser when I click on it but is not uploading the attachment. I have a button that has the value SubmitForm to submit the form. All fields submitted except the attachment datacard is uploading the attachment to the sharepoint list. 

     

    ntt56k4_1-1631065434506.png

    ntt56k4_2-1631065459813.png

     

     

     

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @ntt56k4 ,

     

    The reason is you will not be able to get the real file from Gallery.Selected.Attachments, in the Attachment control it would only display the file but without file actual value.

     

    To achieve your need, you will have to work with Power Automate. Please refer to below thread:

    https://powerusers.microsoft.com/t5/General-Power-Automate/Copy-attachments-from-one-SharePoint-list-to-another-list/td-p/90247

     

    Steps:

    1\ Create a Power Automate flow that copy attachments from the item selected in the Gallery.

     

    2\ OnSelect of the submit button run the flow and passing the item ID as a parameter in the flow.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard