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 / Uploading File Attachm...
Power Apps
Answered

Uploading File Attachment to Attachment column in SharePoint List?

(0) ShareShare
ReportReport
Posted on by 6
I have an existing Canvas PowerApp which I have been asked to add file attachment upload capability to.
 
The current app is a relatively simple collection of normal Canvas input controls, and a submit button - when the user clicks the submit button, a Patch statement creates a SharePoint List record.
 
I followed a tutorial to copy the Attachment control out of a Form control into my normal Vertical container, but I can't find anything that tells me how to include a file the User has uploaded in a Patch statement to add it to the Attachment column of my SharePoint List.
 
Can anyone help me with this step? Or, is there a preferred, different way to handle adding an attachment to a new SharePoint List record?
 
Many thanks in advance...:)
Categories:
I have the same question (0)
  • Verified answer
    Kalathiya Profile Picture
    2,428 Super User 2026 Season 1 on at
     
    Since Patch does not directly support the SharePoint attachment data structure, attachments cannot be uploaded using Patch by itself.
     
    There have 3 workaround ways: 
    #1. Patch with a Form’s .Updates
    If you must use Patch for most fields, you can still leverage the Form to submit attachments only:
    After your Patch of other fields, use the form’s .Updates in your Patch. For example:
    Patch(
        YourSharePointList,
        Defaults(YourSharePointList),
        {
          Column1: "Testing",
          Column2:Dropdown1.Selected.Value 
        },
        Form1.Updates
    );
    ResetForm(Form1);
    //Make sure control name, column name and form name you replace with as per your configuration. 
    So in this case, your form control has the Attachments field, and by using Patch together with Form.Updates, it will store your attachment as well.
     
    #2. Use Submit Form instead of Patching manually - This automatically saves the attachments along with other fields. 
     
    #3. User Power Automate for upload the attachment. 
     
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
     
     
     
     
  • CU15040519-0 Profile Picture
    6 on at
    Hi @Kalathiya, thank you for your reply! Hmmm, maybe I have my wires crossed...
     
    I thought it was possible to have an attachment control on my Canvas screen WITHOUT being embedded in a Form control. I followed a tutorial which showed me how to add a form to the screen, copy the attachment control outside the form, then remove the form. However, as I said above, I can't find anything that tells me how to take the next step of including the attachment in the Patch statement...
     
    Let me start from a different point:
     
    - If you have an existing Canvas app with normal controls, and you were asked to add attachment upload to it - is there any way of doing this WITHOUT having to start from scratch and rebuild the whole app inside a form?
     
    Thank you again!
  • WarrenBelz Profile Picture
    155,752 Most Valuable Professional on at
    Firstly @Kalathiya is completely correct in that the easiest and most logical way of doing this is a Form with an attachment control - even if it is a standalone form with only the control on it (so please mark that accordingly).
     
    If you only have one attachment on the control to Patch (multiple do not work), there is a "hack" you can use. Create a Gallery with the Items
    AttachmentControlName.Attachments
    and put in an Image control with 
    ThisItem.Value
    Then you can do this
    With(
       {_Attach: First(YourGalleryName.AllItems)},
       Patch(
          SPListName,
          Defaults(SPListName),
          {
             YourOtherFieldsHere,
             Attachments: Table(
                {
                   DisplayName: _Attach.Name,
                   AbsoluteUri: Blank(),
                   Id: _Attach.YourImageName.Image,
                   Value: _Attach.YourImageName.Image
                }
             )
          }
       )
    )
    As I noted, a lot of effort when you can simply do a Form.
     
    The idea of separating the Attachment control from a Form is generally used to capture a File that you can send the content to Power Automate or possibly an Image Field (although you would generally use an Add Image control for that one).
     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 474

#1
Valantis Profile Picture

Valantis 474

#3
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

Last 30 days Overall leaderboard