Post

#PowerPlatformTip 122: 'Track Flow Progress in Power Apps'

#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, at the end. 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. 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.

🔸 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.

🛠️ 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.

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).

This post is licensed under CC BY 4.0 by the author.

Microsoft and the Power Platform product names (for example Power Apps, Power Automate, Copilot Studio) are trademarks of the Microsoft group of companies. This is an independent website. It is not operated, sponsored or endorsed by Microsoft.