
Announcements
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