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 Pages / unable to patch the at...
Power Pages
Suggested Answer

unable to patch the attachments into SharePoint

(0) ShareShare
ReportReport
Posted on by 14
Hi ,
 
  I have a gallery grid with 9 columns one of them is attachment, which i copied the data cards value of the form and added it here, in this when i try to add file i am able to add files the challenge is i am not able to save to share point and make it appear in added attachments. My expectation is when i click on the submit button along with the other datas, attachment file should get saved into the sharepoint and also in the attachment add files of gallery. Below is my current patch data in submit button
 
Patch(
       Datasource,ThisItem,{column values to patch}
);
gallery.PNG
Categories:
I have the same question (0)
  • Suggested answer
    sannavajjala87 Profile Picture
    931 Super User 2026 Season 2 on at
    Hi,
     
    The issue is that attachments don't get saved automatically when using Patch() the way they do with a SharePoint form and SubmitForm(). The attachment control only stores the files locally until they're explicitly submitted.
     
    If you're patching records from a gallery, you'll need to either:
    • Use a SharePoint form and SubmitForm() to handle attachments automatically, or
    • Create/update the item first with Patch(), then use a Power Automate flow to upload the attachment(s) to the SharePoint item.
     
    The SharePoint Attachments column cannot be patched with just the other field values. That's why your record saves but the attachment doesn't appear afterward.
     
    A common pattern is:
    1. Patch() the SharePoint item and capture the returned ID.
    2. Pass the attachment content and item ID to a Power Automate flow.
    3. Use the flow to add the attachment to the SharePoint list item.
    4. Refresh the data source so the attachment appears in the gallery.
    If you're using an Attachments control inside a gallery, that's another challenge, as the control is primarily designed to work within an Edit Form. I'd recommend using a flow-based approach for the attachment upload in this scenario.
     
    Thanks & Regards,
    Manoj Annavajjala

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 Pages

#1
Fubar Profile Picture

Fubar 33 Super User 2026 Season 1

#2
Mohsin Ali Profile Picture

Mohsin Ali 25

#3
SP2019admin Profile Picture

SP2019admin 20

Last 30 days Overall leaderboard