PowerBlocks
GuidesPower Apps Patch() does not save or create the record
Power Apps

Power Apps Patch() does not save or create the record

When Patch() silently does nothing or errors, it is almost always a schema, type or required-field mismatch. Here is how to find it.

Common causes

  1. 1A required column is missing from the record you pass — Patch needs every mandatory field on create.
  2. 2A type mismatch: passing text to a number/choice column, or a plain text to a lookup/choice that expects a record.
  3. 3You patched a copy/variable instead of the data source, so nothing persisted server-side.
  4. 4A lookup or choice column was set with a string instead of the related record or the choice value.

How to diagnose

  1. 1Wrap the Patch in a Notify to surface errors: e.g. IfError(Patch(...), Notify("Patch failed: " & FirstError.Message, NotificationType.Error)).
  2. 2Check the column logical names vs display names — Patch uses the field names of the data source.
  3. 3For choices/lookups, set the value to the actual record (e.g. {Value:"Active"} or a LookUp() of the related row).
  4. 4Confirm the user has create/update permission on the table.