#PowerPlatformTip 147: Dummy Patch After Complex Flows
TL;DR: After a complex flow, a dummy Patch of a hidden RefreshHack column on the selected record can make Power Apps re-read that one record instead of the whole list.
Some scenarios need Power Automate for advanced logic, conditional data, external API calls, error fallbacks, multi-record lookups, tracking. The flow finishes and responds to Power Apps, but your Gallery or EditForm still shows pre-flow data. A full Refresh re-reads the whole data source, which can waste bandwidth on large lists. The workaround: a hidden RefreshHack column plus a Dummy Patch on the selected record to refresh that single record.
💡 Challenge
Canvas Patch handles simple updates automatically, but complex logic needs flows. Real scenario: user submits a form → flow validates/approves → updates SharePoint → the app’s cache is blind, so the Gallery can show stale data.
✅ Solution
Create a hidden RefreshHack (single line of text) column and Patch it with Blank() on the selected record right after the flow completes.
🔧 How It’s Done
1. Set up the RefreshHack column
🔸 In your SharePoint/Dataverse list, add a new “RefreshHack” column (single line of text).
🔸 Hide it from all views and forms (no user impact).
🔸 It’s a dummy field that is never used in formulas.
🔸 Side effects: the Patch counts as an edit. The item’s Modified and Modified By values change and a new version is created if version history is enabled. Flows or rules that trigger on item modification will run again, so add a trigger condition or exclude this column to avoid loops.
2. Trigger the flow, then dummy-patch
🔸 On your Gallery → EditForm/Button OnSelect, run the complex flow:
Set(varFlowID, ComplexFlow.Run(GalleryExample.Selected.ID))
🔸 On success, patch the hidden column on the selected record:
If(
varFlowID.Success,
Patch(
MySharePointList,
GalleryExample.Selected,
{ RefreshHack: Blank() }
);
Notify("Update complete!", NotificationType.Success)
)
3. What happens
🔸 The flow runs its full logic (Switch conditions, HTTP fallback, etc.).
🔸 The Patch writes to the record. Patch returns the record as the data source saved it, including the columns the flow changed, and Power Apps updates that record in the data it already holds, so the Gallery/Form shows the data the flow wrote.
🎉 Result
The Gallery or form shows the flow’s changes for the selected record without reloading the whole data source.
🌟 Key Advantages
🔸 Precise targeting: GalleryExample.Selected hits the right record.
🔸 No bulk reload: only one record is touched, not the full data source.
🔸 No delegation issue: a single Patch on one record.
🔸 Lower bandwidth: useful for field users.
⚠️ Good to Know
🔸 Conflict error: if the Patch fails with “Conflicts exist with changes on the server”, the app still holds an older copy of the record. Call Refresh(MySharePointList) once and run the Patch again, and catch the case with IfError().
🔸 One record only: the trick refreshes exactly the record you patch. If the flow changes several records, use Refresh() on the data source instead.
🔸 Return the values instead: if the flow already sends the changed values back with Respond to a PowerApp or flow, you can skip the extra write and show those values directly.
🎥 Video Tutorial
🛠️ FAQ
1. Why the RefreshHack column specifically? A single-line text column is lightweight, and writing Blank() to it changes no business data. The Patch still counts as an edit (see the side effects above).
2. Is direct Patch enough for simple cases? Yes, a direct Patch updates the data source and the app. Use flows only for complex logic.
3. What if the flow changes several records? Then the dummy Patch is the wrong tool, because it refreshes only the record you patch. Call Refresh(MySharePointList) once after the flow, or patch each changed record if there are only a few.
🔗 Related Tips
- #PowerPlatformTip 38: Data Refresh, the standard refresh patterns this improves on.
- #PowerPlatformTip 57: Mastering Patch, core Patch techniques.
This tip is by Marcel Lehmann, Microsoft MVP (Business Applications) and founder of the Power Platform Academy – live Power Platform workshops, free or CHF 49. Join the workshop waitlist to get notified about new dates. For companies that want this implemented for them, see KMUpower – Power Platform consulting & automation for SMEs (DACH).