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 / 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard