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

Update multiple records in SharePoint List from PowerApps EditForm including an attachment

(0) ShareShare
ReportReport
Posted on by

Hi Guys, 

I intent to update multiple record in SharePoint List, based on the RequestNo matching the entered data in EditForm in Powerapps. Single record gets updated using the following query, but whatif, we have many RequestNo in SharePoint List?? 

1. Can we use Updateif or ForAll function but the data I am going to update is from a Form not Gallery!

2. Secondly, I also need to update/upload the same attachment, if there are multiple records, how can I include it in the ForAll loop or updateif loop?

 

To update a single record, following is the code, working perfectly:
Patch('POAs List',LookUp('POAs List',RequestNo = RequestNo_DataCard1.Default),
{
'POA No.': DataCardValue73.Text,
'Issuance Date':DateValue(IssuanceDt.Text,"fr"),
'Expiration Date':DateValue(DataCardKey76_1.Text,"fr"),
});
SubmitForm(Form4_1); /*For Attachment*/

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    @LAIKSAYY3, regarding your first question: if the request no is not something unique, so it can be shared across multiple records, the UpdateIf() should do the trick:

     

     

    UpdateIf('POAs List', RequestNo = RequestNo_DataCard1.Default, {
    'POA No.': DataCardValue73.Text,
    'Issuance Date':DateValue(IssuanceDt.Text,"fr"),
    'Expiration Date':DateValue(DataCardKey76_1.Text,"fr"),
    })

     

     

    This will update all records with that request number.

    I hope this helps!

  • LAIKSAYY3 Profile Picture
    on at

    Thanx Laurens for your prompt response. 

    The RequestNo field in the SharePoint List is not unique definitely, there are many RequestNo.

    I will use the UpdateIf,, however, I am worried for the attachment to be uploaded for each record being updated. How do I do that?

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @LAIKSAYY3 after some testing I have found a way to do this, it will require 2 UpdateIf statements.
    One to update the fields (see above) and one to add the attachments. However, please make sure that your form mentioned as 'FormName' is on DisplayMode.New and only the attachment datacard is shown.

    Please try the following code:

     

    //Update fields
    UpdateIf('POAs List', RequestNo = RequestNo_DataCard1.Default, {
    'POA No.': DataCardValue73.Text,
    'Issuance Date':DateValue(IssuanceDt.Text,"fr"),
    'Expiration Date':DateValue(DataCardKey76_1.Text,"fr"),
    })
    
    //Add attachments
    UpdateIf('POAs List', RequestNo = RequestNo_DataCard1.Default, FormName.Updates)

     


    If this solves your question, would you be so kind as to accept it as a solution.
    Thanks!

  • LAIKSAYY3 Profile Picture
    on at

    Thanx Laurens! it has done perfectly! 😀

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard