how to udpate using patch powerapps

SharePoint Asked on November 19, 2021

How to update using patch in SharePoint list from edit form?

Using below patch function. but, its creating new record every time.

Patch(test, Defaults('test'),
    ReasonforLateSubmission: DataCardValue201_2.Text,
    WorkDescription: DataCardValue202_2.Text,
    OtherBusinessJustification: DataCardValue206_2.Text,
    DetailedWorkDescription: DataCardValue203_2.Text,
    WorkRequestJustification: DataCardValue204_2.Text,
    Title: DataCardValue210_2.Text


One Answer

You need to pass ID of list item as a BaseRecord for update operation.


Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ])
  • DataSource – Required. The data source that contains the record that you want to modify or will contain the record that you want to create.
  • BaseRecord – Required. The record to modify or create. If the record came from a data source, the record is found and modified. If the result of Defaults is used, a record is created.
  • ChangeRecord(s) – Required. One or more records that contain properties to modify in the BaseRecord. Change records are processed in order from the beginning of the argument list to the end, with later property values overriding earlier ones.

Source: Patch - Syntax.

Also, check the examples given at Patch - Updates.

OR the excellant video tutorial given at: PowerApps Patch Function.

Answered by Ganesh Sanap on November 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP