Hello,
I have an inventory app and i want to save articles from invoice to a sharepoint list. I add all the product from one invoice to a collection row by row..If column Quantity for an article (ProductName) is equal to 1 i want to patch that line once, other way i want to patch same article based on that quantity( two times or then, depending on quantity)
Can anybody help me?
Thanks
The collection named col_InvoiceItems look like this:
| ProductName | Quantity | ProductPrice |
| laptop1 | 2 | 100 |
| laptop2 | 1 | 150 |
| Phone | 3 | 25 |
See the code bellow for normal patch ...
ForAll(
col_InvoiceItems,
Patch(
ITInventory,
Defaults(ITInventory),
{
'Product': ThisRecord.Productname,
'Price': Value(ThisRecord.ProductPrice)
}
)
)