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 / Bulk record updation
Power Apps
Unanswered

Bulk record updation

(0) ShareShare
ReportReport
Posted on by 237

 

Hi,

 I got below error while patch bulk records.

Please help to resolve the issue.

Onselect of submit button my code is

 

UpdateIf(Rowsave,true,
{
Status:{Value:"Submitted"}

});
Patch('Time sheet',Rowsave);
Notify("Records Submitted",NotificationType.Success);
Clear(Rowsave)

 

Powerappsuser11_0-1691663023689.png

 

Categories:
  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    Hi @Powerappsuser11,

     

    Your patch function is missing the third argument that is the data to patch on the current record. Also the second argument to patch function should be a record not a table. It would be something like this.

     

     

    Patch('Time sheet',Rowsave, {Status: "Submitted"});

     

     

    If you found my answer helpful, please consider giving it a thumbs-up or a like. Your feedback is greatly appreciated!

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    If this does not help can you please explain what you are trying to achieve.

  • Powerappsuser11 Profile Picture
    237 on at

    Hi @Talha_Dar 

     

    Thanks for respond,

     

     In screen added blank gallery ,Gallery items=colletions---Add row

    In gallery added checkbox,draft button.

    My requirement is bulk update  draft records.

    checkbox--oncheck---collect(rowsave,thisitem)

              onuncheck---Remove(rowsave,thisitem)

    Onselect of submit button my code is 

    UpdateIf(Rowsave,true,
    {
    Status:{Value:"Submitted"}
    });
    Patch('Time sheet',Rowsave);
    Notify("Records are submitted",NotificationType.Success);
    Clear(Rowsave)

     

    Powerappsuser11_0-1691669387871.png

     

     

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    Do you want to patch your list with the data in "RowSave" collection?

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    Hi @Powerappsuser11,

     

    Here is how you can achieve the desired functionality.

    • Set the following formula on the "OnCheck" and "OnUnCheck" property of Check Box.

     

     

    ClearCollect(Rowsave, Filter(GalleryName.AllItem, CheckBoxName.Value = true)

     

     

    • Then on the submit button Set the following code.

     

     

    ForAll(Rowsave As currItem, Patch('Time sheet',currItem, {Status: "Submitted", // Other patch data});)
    Notify("Records are submitted",NotificationType.Success);
    Clear(Rowsave)

     

     

    If you found my answer helpful, please consider giving it a thumbs-up or a like. Your feedback is greatly appreciated!

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Powerappsuser11 Profile Picture
    237 on at

    Hi @Talha_Dar 

     

    I tried above code but getting below error.

    Please help to resolve this one.

    checbox-oncheck-ClearCollect(rowsave,Filter('Add Gallery'.AllItems,Checkbox8.Value=true))

          unoncheck-ClearCollect(rowsave,Filter('Add Gallery'.AllItems,Checkbox8.Value=true))

    Submit button-onselect

    ForAll(rowsave,Patch('Time sheet',rowsave,
    {
    status:"Submitted"
    }));
    Notify("Records are submitted",NotificationType.Success)
    Clear(rowsave)

    Powerappsuser11_0-1691728114346.png

     

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    I provided you with this formula, but you are using a modified one.

     

    ForAll(Rowsave As currItem, Patch('Time sheet',currItem, {Status: "Submitted", // Other patch data});)

     

    Here "Rowsave" is you collection name and 'Time sheet' is your Datasource name you can change these two with your own variables.

  • Powerappsuser11 Profile Picture
    237 on at

     

    Hi @Talha_Dar 

     I tried but getting error.

     My code on select of submit button.

    ForAll(indata,Patch('Time sheet',indata,
    {
    status:"Submitted"
    }));
    Notify("Records are submitted",NotificationType.Success)
    Clear(indata)

     

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    You are not using the correct formula. What is the name of your collection?

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    is "indata" your collection name?

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 Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard