web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multi-Select Grid Upda...
Power Apps
Unanswered

Multi-Select Grid Update Creating Duplicate Records

(0) ShareShare
ReportReport
Posted on by 20

Hi There,

I am new to PowerApps and followed the EditGrid video by Reza Doranni but got stuck where I'm getting record(s) created every time I submit an update to an existing record(s).  I have a gallery grid where users can have the option to update multiple records at once.  After selecting the record(s) they want to have updated, they would select the 'Update' button and once they confirm their responses, they would select the 'Submit Form' button to submit the responses back to the SharePoint List.  To avoid creating new/duplicate records, I tried adding the first filter code provided above, but was unable to get it to work.  Any feedback you have would be greatly appreciated.

 

Update Button:

UpdateIf(
colGridData,
ThisRecord in colSelected,
{'Value for This Period': ValueUpdate.Selected,
'Event Response':EventResponseUpdate.Text,
'P1/P2 Impacted Products':P1Update.Text,
Status:StatusUpdate.Selected}
);
Clear(colSelected);
Reset(checkboxAll)

 

Submit Button:

If(
varGridEdit,
Patch(
PSRA_Events_Response_Form,
colGridData
)
);
Notify(
"Form Data Updated",
NotificationType.Success,
2000
);
Select(btnLoadData);
Set(
varGridEdit,
!varGridEdit
)

 

Based on the advice above, I tried to make updates to the code as follow, but got an error message:

If(varGridEdit,
Patch(
colGridData,
First(
Filter(
colGridData,
ID = galleryGrid.Selected.ID)),
colGridData)
);
Notify(
"Form Data Updated",
NotificationType.Success,
2000
);
Select(btnLoadData);
Set(
varGridEdit,
!varGridEdit
)

 

Any idea what I may be doing wrong?

 

Thank you in advance for your feedback.

Lynn

Categories:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard