Hi @Fahd ,
I hope you are updating necessary List in SharePoint.
How are you updating records for these lists?
Let's say you want edit List then you must save those items only
//For Editing List B
Patch(
ListB,
Gallery.Selected,
{
Perediems: Value(DataCardValue.Text)
}
)
//For Editing List A
Patch(
ListA,
Gallery.Selected,
{
Perediems: Value(DataCardValue.Text)
}
)
Now if you are using same buttons then do use a variable that which is the last Gallery Record you selected:
To make it clear, you are identifying which Gallery the record belongs thus you can use Patch accordingly
//OnSelect Records to Gallery that has List A as datasource
UpdateContext({varSelectedSource: "List A"});
//OnSelect Records to Gallery that has List B as datasource
UpdateContext({varSelectedSource: "List B"});
//Then when you are saving record
If(
varSelectedSource = "List A",
Patch(...List A...),
Patch(...List B...)
)
Hope this helps