Hi All,
I have a shopping cart that has a SP list with stock numbers. I have created a formula that identifies the id number attached to the products in the shopping basket and reduces the number by the value in the basket.
ForAll(
colShoppingCart,
UpdateIf(
'Merchandise Stock List_1',
ID in colShoppingCart.ProductID,
{
Quantity: Value(
LookUp(
'Merchandise Stock List_1',
ID in colShoppingCart.ProductID
).Quantity
) - Value(
LookUp(
colShoppingCart,
ProductID in 'Merchandise Stock List_1'.ID
). QTY
)
}
)
)
The problem is that it deducts the sum of all items in my collection from the stock of each product as well as changing the quantity of each item to the quantity of the first item in the basket. For example, if two items were in a basket with 10 and 15 quantities in stock, after the order the stock count would say 8 for both of them. Is there a way to resolve this?

Report
All responses (
Answers (