Skip to Content

Microsoft PL-900: What Does Power Apps’ ‘Patch’ Function Do?

Learn what the Patch function does in Power Apps. Discover how Patch updates or creates records in a data source, enabling flexible and dynamic data management in business applications.

Question

What does Power Apps’ ‘Patch’ function do?

A. Generates a summary report of all app users
B. Deletes entire datasets from Dataverse
C. Encrypts Power Apps data for security
D. Converts Power Apps formulas into AI models
E. Updates or creates records in a data source

Answer

E. Updates or creates records in a data source

Explanation

The ‘Patch’ function in Power Apps is used to modify or add records in a connected data source dynamically.

The Patch function in Power Apps is used to update or create records in a data source. It provides a versatile way to modify existing records or add new ones, supporting scenarios where you need to programmatically handle data changes beyond what standard form controls allow.

Key capabilities of Patch

  • Update existing records: Patch can target a specific record in a data source (such as SharePoint, Dataverse, or SQL) and update only the specified fields, leaving other data unchanged.
    Example:
    Patch(Employees, Gallery1.Selected, {FullName: “Sarah Green”, Active: true}) updates the selected employee’s name and status.
  • Create new records: By using the Defaults function with Patch, you can add new records to a data source.
    Example:
    Patch(Employees, Defaults(Employees), {FullName: “Sarah Green”, EmployeeNumber: 1002}) adds a new employee record.
  • Bulk operations: Patch supports updating or creating multiple records at once, often in conjunction with the ForAll function.
  • Flexible data handling: Patch works with various data types (text, numbers, dates, choices) and can use input controls for dynamic data entry.

Best use cases

  • When you need to update or create records outside of standard form submissions.
  • When working with complex forms spanning multiple screens or requiring conditional logic.
  • For bulk data operations or merging records.

The Patch function in Power Apps enables dynamic modification or creation of records in connected data sources, providing granular control over data management and supporting advanced app scenarios.

Microsoft Power Platform Fundamentals PL-900 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Power Platform Fundamentals PL-900 exam and earn Microsoft Power Platform Fundamentals PL-900 certification.