Power Apps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
 View Only
  • 1.  Error reported in Patch statement

    Top Contributor
    Posted Jul 23, 2021 08:58 AM
    PowerApps is reporting an error in a Patch satement that I can't see. I am testing a control in a form to see if it is blank. If It is I am Patching a value into a field in the Sharepoint data. My code is:
    Patch(MobileDevices, frm_DeviceEdit_1.LastSubmit, {Employee:BlankPerson})
    where "MobileDevices is the list, and frm_DeviceEdit_1 is the form and Employee is the field I need to patch. What am I missing?

    ------------------------------
    Brian Scott
    Chief Creative Officer
    Concord NC
    ------------------------------


  • 2.  RE: Error reported in Patch statement

    Top Contributor
    Posted Jul 23, 2021 07:52 PM
    Hi Brian,
    Try this
    Patch(
       MobileDevices, 
       {ID:frm_DeviceEdit_1.LastSubmit.ID},
       {Employee:BlankPerson}
    )​

    Also consider instead putting on the OnSuccess of the form

    Patch(
       MobileDevices, 
       {ID:Self.LastSubmit.ID}, 
       {Employee:BlankPerson}
    )


    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------