Power Fx function
Patch (update) — Power Fx function reference
Update an existing record.
Syntax
powerfx
Patch( DataSource, BaseRecord, ChangeRecord [, ChangeRecord2, ... ] )
Examples
powerfx
Patch(Tasks, ThisItem, {Status: "Done"})→ Updated record
powerfx
Patch(Tasks, LookUp(Tasks, ID = locId), {DueDate: DatePicker1.SelectedDate, AssignedTo: {Value: cmbAssignee.Selected.Email}})powerfx
Patch(Tasks, ThisItem, {Status: "Done"}, {CompletedDate: Today()})Common mistakes & gotchas
- Patch returns the resulting record — capture it with Set() if you need server-assigned values like an autonumber ID right after the write.
- BaseRecord needs the source's primary key present; a record rebuilt from a collection copy that dropped the ID column will fail to match the row.
Related Power Fx functions
From Creating & changing records