#PowerPlatformTip 122: 'Track Flow Progress in Power Apps'
TL;DR: Generate a
GUID()in the app, pass it to the flow, and let the flow create and update a status row with that GUID at each milestone. A Timer in the app refreshes and reads the row every few seconds and stops on a final status such as “Complete” or “Failed”. The full walkthrough with flow screenshots is in How to Track the Current Progress of a Flow in PowerApps.
💡 Challenge
A long flow started from a button leaves the user with a spinner and no idea how far it got. The flow can return a value to the app, but only once, as a single answer and not as a stream of updates. An early response can carry the status known at that moment, but later changes can’t be sent through the same call; there is no built-in way to push intermediate steps back to the running app.
✅ Solution
Turn the progress into data. The app creates a unique key, the flow writes its status under that key into a small table, and the app polls that table with a Timer. Any data source the app and the flow can both reach works; a SharePoint list with three columns is enough.
🔧 How It’s Done
1. Create the status table.
🔸 Columns: Title (status text), GUID (single line of text), StateCode (number).
2. Start the flow with a GUID.
🔸 Button OnSelect:
Set(varRunId, GUID());
Set(varState, Blank());
Set(varPolling, true);
wfState.Run(Text(varRunId))
3. Write the status in the flow.
🔸 First action after the trigger: Create item with the GUID from the trigger, StateCode 0 and Title “Flow started”.
🔸 After each milestone: Update item with the next StateCode and text. As the last action of the successful path, write StateCode 3 and Title “Complete”; this is the value the Timer waits for. Add a branch with Configure run after “has failed” / “has timed out” that writes StateCode 9 “Failed”.
4. Poll with a Timer.
🔸 Duration: 3000, Repeat: true, Start: varPolling. Start reacts to the variable on every click, AutoStart only fires when the screen opens.
🔸 OnTimerEnd:
Refresh(StateLog);
Set(varState, LookUp(StateLog, GUID = Text(varRunId)));
If(varState.StateCode = 3 Or varState.StateCode = 9, Set(varPolling, false))
🔸 A label shows varState.Title.
🎉 Result
The user sees “Flow started”, the milestones and finally “Complete” or “Failed” while the flow runs, and the Timer stops on its own.
🌟 Key Advantages
🔸 Real progress: each milestone becomes visible, not just the end.
🔸 One row per run: the GUID keeps parallel runs of several users apart. It is a key, not an access control (see Good to Know).
🔸 Standard connectors: a SharePoint list and the Power Apps trigger, no premium.
⚠️ Good to Know
🔸 Every Timer tick calls the data source. Use a longer Duration for long flows, and always stop the Timer on the error status too, otherwise it keeps polling after a failed run.
🔸 The Timer only stops when a row with StateCode 3 or 9 becomes readable. If the flow cannot even create the row or cannot write its final status, neither condition is met. Add a maximum wait (for example stop polling after a fixed number of minutes) and show “Status unknown” instead of “Failed” in that case.
🔸 varRunId holds only one run. Every click creates its own status row, but a second click while polling overwrites varRunId, and the first run is no longer displayed. Disable the button while varPolling is true, or keep separate IDs and displays for parallel runs.
🔸 The GUID separates the rows in the LookUp, it does not restrict who can read the list. If users must not see other people’s status rows outside the app, restrict read access on the list or table, or return the status through an authorized read, and consider the identity under which the flow creates the rows.
🛠️ FAQ
1. Why not return the progress with “Respond to a PowerApp or flow”?
The response ends the conversation between app and flow. The app receives one result, so it cannot show the steps in between.
2. Why a GUID and not the user’s name?
The same user can start the flow twice, and several users run it at the same time. A new GUID() per click gives every run its own status row.
3. Does it work with Dataverse instead of SharePoint?
Yes. Use a Dataverse table with the same three columns; the app formulas stay the same apart from the data source name. Dataverse is a premium data source, so app users and the flow need the matching licenses.
🔗 Related Tips
- How to Track the Current Progress of a Flow in PowerApps, the full article with flow structure, StateCode icons and sequence diagram.
- #PowerPlatformTip 147: ‘Dummy Patch for Complex Flows’, refresh just the affected record once the flow is done.
- #PowerPlatformTip 117: ‘Optimize Parallel Object Processing’, speed up the long-running part of the flow itself.
This tip is by Marcel Lehmann, Microsoft MVP (Business Applications) and founder of the Power Platform Academy, which runs free live workshops (in German). See the next free workshop dates (in German). For companies that want this implemented for them, see KMUpower: Power Platform consulting & automation for SMEs (DACH).