PatchPrivatePreviewFeedbackGroup icon indicating copy to clipboard operation
PatchPrivatePreviewFeedbackGroup copied to clipboard

patch columns computed from other properties of the same document in backend

Open ssrikantan opened this issue 4 years ago • 0 comments

Let's say this is a document that exists in Cosmos DB already { "id": "SalesOrder4", "ponumber": "PO1800918647044", "ttl": 2592000, "OrderDate": "2005-07-01T00:00:00", "ShippedDate": "2021-06-02T04:59:36.878356Z", "AccountNumber": "Account1", "SubTotal": 100, "TaxAmount": 12.5838, "Freight": 472.3108, "TotalDue": 985.018, "Items": [ { "OrderQty": 2, "ProductId": 762, "LineTotal": 419.4589 }, { "OrderQty": 10, "ProductId": 750, } ] }

For the index position 1, the line total does not exist yet Using the Patch API, without reading the OrderQty for this record upfront, I want to perform a server side operation, by saying set the value of Linetotal to OrderQty * 10.23

ssrikantan avatar Jun 02 '21 13:06 ssrikantan