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 / Patch attachments - Po...
Power Apps
Answered

Patch attachments - Possible? How?

(1) ShareShare
ReportReport
Posted on by 775

Hello together,

 

I have created an application form with which you can apply for various things. I have now also added this DataCard where you can upload attachments. I want these documents (in the attachments) to be saved in a column in my sharepoint list. (See pictures)


Can I simply patch the attachments or use the patch function or is that not possible with attachments?
If no, how can I solve it?

 

PowerSm_0-1643886866943.png

PowerSm_1-1643886967472.png

Thanks in advance!

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

    https://www.youtube.com/watch?v=ECwRwjyPAQE

     

    There is a lot of information about that online

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Need-to-add-Attachment-to-a-PATCH-to-a-SharePoint-List/td-p/158968

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Saving-attachments-using-Patch/td-p/277984

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Verified answer
    PowerSäm Profile Picture
    775 on at

    HI @Nogueira1306 and thank you for your reply. 

     

    I found this video of Shane Young very nice and easy to understand: Click here for the video 

    This one answered my question. After that I changed it so that an attachment doesn't end up in a document library but in a sharepoint list, but the principle is very similar.

     

    Nevertheless, thank you!

  • Bhanes22 Profile Picture
    103 on at

    I think this video is even easier - https://youtu.be/yC0W5am6M3Q

  • HEATFreight Profile Picture
    1,024 on at

    How can I do this directly in a canvas app without using Power Automate? Is that possible?

    I want to copy the attachments from an item in list A to an existing item in a totally different list, call it list B. It does not seem like PowerApps allows for programmatically copying attachments between items in different SharePoint lists. Can someone confirm if this is true?

    See my response in this other thread.

  • HEATFreight Profile Picture
    1,024 on at

    Aha! I figured it out. If you need to patch attachments from an item in one SharePoint list to an item in a totally different SharePoint list, you must first remove the Attachments.Id parameter from the collection!

    I used the following code:

     

    ClearCollect(colAttachments,AddColumns(DropColumns(colAttachments,"Id"),"Id",""));
    ResetForm(AttachmentsForm);
    Patch(SharePointList,LookUp(SharePointList,ID=ThisItem.ID),AttachmentsForm.Updates);

     

  • StephCORKING Profile Picture
    203 on at

    @HEATFreight 

    You're the best.  This is exactly what I needed!

  • Catarina_Teles Profile Picture
    2 on at

    May I ask how did you do it? Did you just use the URL where normally the files go instead of folder or did you do something else?

     

    Thanks!

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 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard