1

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

  }
);
1
  • You need to pass ID for update operation. – Ganesh Sanap Nov 26 '19 at 8:29
1

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

Syntax:

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.

3
  • i am navigating to edit form gallery gallary.selected value – kumar Nov 26 '19 at 8:36
  • thank you its done – kumar Nov 26 '19 at 8:39
  • Great. glad it worked for you. – Ganesh Sanap Nov 26 '19 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.