Hello,
I have an app where I save a SharePoint item in a local basked for checkout.
Its setup like this,
For example there is 10 apples each is one row in a SharePoint list.
I then have an button, add to basket which stores the ID of the row for later removal upon successful purchase.
However when i press the "add to basket" button it sometimes add the same item more than one time.
This is my code:
Refresh(Lager);
Patch(Lager, First(Filter(Lager, ThisItem.Title = 'Title (Title0)'.Value, Reserverad.Value = "Nej")), {
Reserverad:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:Value(First(Filter(Lager, ThisItem.Title = 'Title (Title0)'.Value, Reserverad.Value = "Nej")).ID) ,
Value:"Ja"}
});I first refresh the stock (lager) patching the first item that is not reserved to reserved.
Then if i press the button again it should get the next available item but it only works 50% of the time.
Any ideas?
-Draax

Report
All responses (
Answers (