Forum Discussion

AdamW0708's avatar
AdamW0708
Copper Contributor
Apr 05, 2024
Solved

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 no...
  • Rob_Elliott's avatar
    Apr 09, 2024

    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)

Resources