Hey together,
I'm struggeling with patching values from a collection to sharepoint list. In my case I have to add or subtract the value "quantity" from collection to the existing "quantity" in my sharepoint list.
"Serial number" is unique for every element in my sharepoint list so the patch should map it correctly via the serial number.
I tried it with the following lookup but thats not working...
ForAll(
colReturnCart;
Patch(
Elektroteileliste; LookUp(Elektroteileliste;
Value(Elektroteileliste[@Serialnumber])=Value(colReturnCart[@Serialnumber]));
{'Inventory in stock': Value(LookUp(Elektroteileliste; Value(Serialnumber) =
Value(ThisRecord.Serialnumber)).'Inventory in stock') + colReturnCart[@Quantity];
'Inventory in circulance': Value(LookUp(Elektroteileliste; Value(Serialnumber) =
Value(ThisRecord.Serialnumber)).'Inventory in circulance') - colReturnCart[@Quantity]}
)
)
"colReturnCart" is the collection and "Elektroteileliste" is my sharepoint list.
"Inventory in stock" and "Inventory in circulance" are the Columns in my list to patch.
Thanks for helping,
Lukas