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

Patch / Update Attachment column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone,

 

I'm trying to patch/update attachment column for existing record in SP List with PowerApps.

 

I'm using Edit Form in different screen which only have attachment control only.

 

The uploaded attachment will save the attachments in all records that meet 2 conditions which are:

- Name = User().FullName

- Date = Today() 

 

I'm trying to do something like this but i doesn't work.


Patch( 'List Name',
            LookUp('List Name', Name = User().FullName && Date = Today(), {Attachments: DataCardValue30.Attachments}
          )

 

Any ideas to solve this? Should i use patch or updateIf?

 

Thank you in advance!

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@shabilass,

    Based on the issue that you mentioned, do you want to modify the attachment based on the current user and Today()?

    Actually, you could not patch attachment from PowerApps to the SP list directly. You should use Form.Updates to update the attachments.

    I have a test on my side, please take a try as below.

    Add a Gallery named Gallery2 and set the Items property as

     

    Filter(
     PReSaleS,
     PPP.DisplayName = User().FullName && Dat = Today()
    )

     

    Set the">" button OnSelect property as below:

     

    NewForm(EditForm2);Navigate(Screen1)

     

    Set OnSelect property of the save button as below:

     

    Patch(
     PReSaleS,
     Gallery2.Selected,
     EditForm2.Updates
    )

     

    Best Regards,

    Qi

     

  • V_20 Profile Picture
    2 on at

    Hello,

    I’m working on a customized power apps form in Sharepoint list. It has three screen for new, edit and view, I also set the on save on SharePoint Integration using Submit Form (). On edit mode, all data cards saves the changes except for Attachment when I remove, replace or add a file it won’t get updated and just keep showing the file uploaded when it was first created. Any suggestion what I might missing? 

    Thank you in advance.

  • meichen Profile Picture
    6 on at

    Agreed with v_20. Sample code does not work for me.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard