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 changes is addin...
Power Apps
Answered

Patch changes is adding new items

(0) ShareShare
ReportReport
Posted on by 192

Hi all, 

I have Editable Grid in gallery and I'm trying to patch the changes to the datasource (SP List), when I'm clicking on save it is adding new items to the list with the changes instead of updating the item.

 

Edit/save Icon Onselect:

If(vareditSOC,Patch('ListName',colGridDataSOC));Select(BtnLoadDataSOC); Set(vareditSOC,!vareditSOC)

 

Datacards Onchange:

Select(Parent)

 

Gallery Onselect:

Patch(
colGridDataSOC,
ThisItem,
{
Title: Title.Text,
'Customer Name': CustomerName.Text,
'Project ID': ProjectID.Selected,
'Service Name': ServiceName.Selected,
'Hours Spent': Value(HoursSpent.Text),
'Request Date': RequestDate.SelectedDate,
'Approval Date': ApprovalDate.SelectedDate,
'Execution Date': ExecutionDate.SelectedDate,
Comments: commentsdata.Text
}
)

 

Categories:
I have the same question (0)
  • Verified answer
    WiZey Profile Picture
    3,023 Moderator on at

    Hello @lidor_dayan ,

     

    To edit multiple records with "Patch()", you need to provide three parameters:

     

    1. The datasource, of course

    2. A table containing the records to update

    3. A table containing the updates to apply

     

    Both table must contain the same records in the same order, otherwise you may encounter a few issues.

     

    Patch(
     datasource,
     Sort(
     ShowColumns(
     Filter(
     datasource,
     ID in colGridDataSOC
     ),
     ID
     ),
     ID
     ),
     Sort(colGridDataSOC, ID)
    )

     

    Hope this was helpful to you.

  • lidor_dayan Profile Picture
    192 on at

    Hi @WiZey, I have delegation warning in the filter there is other way to do it?

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
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard