Good afternoon,
I have a problem and I hope you can help me.
The following I have a "Shopping Cart" system and the same system for adding products to a fulfillment point.
Example:
I need to send
1 mouse
1 keyboard
5 Cables
to the service point 5
I go and add it to the "cart" and send it by saving it in a Collection and then sending the fields to the Point of Service's stock sharepointn list, but the problem is when I already have a ProductID registered at that Point of Service even though the Qty is 0 it adds a new record, a new line in the Sharepoint list.
What I want is for it to record on the SAME line that the ProductID is equal and the PontoDeAtendimento is also equal to the new QTY for sending the product to the service point.
CarrinhoPA = Collection
Shopping Cart Items PA = Point of Service stock sharepoint list
If(
IsEmpty(CarrinhoPA);
Notify("Carrinho vazio, rever informações";NotificationType.Information);
ForAll(CarrinhoPA; Patch('Shopping Cart Items PA';Defaults('Shopping Cart Items PA');{
Title: Title;
ProductPrice:Product_Price;
QTY: QTY_PA;
ProductID: Product_ID;
PA: PAEstoque.Selected.Value;
MovimentType:"Saida";
ImageLink: Image_Link;
ProductDescription:Product_Description})));;
ForAll(CarrinhoPA; UpdateIf('Shopping Cart Items'; ProductID = Product_ID;{
QTY: QTY - QTY_PA }));;
Clear(CarrinhoPA);;
Reset(PAEstoque);;
Set(varShowMsg;true)

Report
All responses (
Answers (