Hey guys,
I am trying to make an editable grid using a gallery, i am facing an issue where whenever i keep on save it doesnt override the previous records instead it adds to them in my data verse table.
so for my gallery this is the item for it:
Filter('PO Supplies Details','IR Request ID' = SelectedItem.'IR Request Id')
then I have a button where its visibility is hidden where the grid update should happen:
If(
IsBlank(
LookUp(
colGridUpdates,
'PO Supplies Detail' = ThisItem.'PO Supplies Detail'
)
),
Collect(
colGridUpdates,
ThisItem
)
);
UpdateIf(
colGridUpdates,
'PO Supplies Detail' = ThisItem.'PO Supplies Detail',
{
'Expenditure Type': ExpenditureTypeInp.Text,
'Deliverables ': DeliverablesInp.Text,
'PO Id': NewPOID,
'Date Promised ': DatePromisedInp.SelectedDate,
Amount: Value(AmountInp.Text),
'New Quantity ': Value(newQuantityInp.Text),
'Previous Quantity ': Value(prevQuantityInp.Text),
'New Unit Price': Value(newUnitPriceInp.Text),
'Previous Unit Price': Value(preUnitPriceInp.Text),
UOM: UOMInp.Selected.Value,
WBS: WBSInp.Text
}
);
the 'PO Supplies Detail', is the uniquely identifier from my table and then is my save functionality:
Patch(
'PO Supplies Details',
ShowColumns(
colGridUpdates,
'IR Request ID',
'PO Id',
'New Quantity ',
'Date Promised ',
'New Unit Price',
'Expenditure Type',
'Deliverables ',
'Previous Quantity ',
'Previous Unit Price',
Amount,
UOM
)
);
Clear(colGridUpdates);
if anyone can help me with this i would really appreciate it and thank you.