Forum Discussion
AdamW0708
Apr 05, 2024Copper Contributor
Patch failure
i All,
I would greatly appreciate any input on this code below:
This code is an Onselect
The button is functioning and I navigate all the way to home screen but the Sharepoint list is not updating with the requested new values
Quantity in Stock is the Column that needs updating with the new figure
TransferList_1 is the Gallery
NewQUANTGDSIN is a calculated value of Quantity in Stock less the value in the Box (the stock being transferred out)
Stock record 7.3.24 is the Sharepoint List
Many thanks for any support that can be offered,
Adam
AdamW0708 try it with something like:
IfError(ForAll(galStock.AllItems,Patch([@InStock],ThisRecord,{InStock: Value(lblNewStockLevel.Text)})),Notify("Error saving records"));Refresh(InStock);Notify("Stock levels updated successfully",NotificationType.Success);Reset(galStock);Set(varReset, true);Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
2 Replies
- Rob_ElliottBronze Contributor
AdamW0708 try it with something like:
IfError(ForAll(galStock.AllItems,Patch([@InStock],ThisRecord,{InStock: Value(lblNewStockLevel.Text)})),Notify("Error saving records"));Refresh(InStock);Notify("Stock levels updated successfully",NotificationType.Success);Reset(galStock);Set(varReset, true);Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)- AdamW0708Copper ContributorThankyou Rob,
this seems to have worked,
I really appreciate your assistance