SharePoint Asked by Tera Byte on November 23, 2021
How to update using patch in SharePoint list from edit form?
Using below patch function. but, its creating new record every time.
When I select an item from the gallery and edit it, creates a new item what’s the problem?
Patch Code:
If(DataCardValue1.Selected.Value = "Time Off",
Patch(
LeaveRequests,
Defaults(LeaveRequests),
{
LeaveID: CurrentUserID,
User: DataCardValue6.Text,
UserEmail:
{
Claims: Concatenate(
"i:0#.f|membership|",
DataCardValue3.Selected.Email // Person email
),
Department: "",
DisplayName: "",
Email: User().Email, // Person email
JobTitle: "",
Picture: ""
},
Description: DataCardValue2.Text,
TimeOffDate: DataCardValue22.SelectedDate,
TimeOffFrom: DataCardValue19.Selected,
TimeOffTo: DataCardValue20.Selected,
TotalTimeRequested: Label23.Text
}
)
); Navigate(SucessScreen,None)
Use patch as below. You are proabably using Defaults() as second parameter to your patch function.
Patch(DataSource, {ID:selectedGalleryItem.ID},{Title:'UpdatedValue'});
Answered by Akshay Randive on November 23, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP