Loading...

How to implement a Power Automate progress indicator in Power Apps

How to implement a Power Automate progress indicator in Power Apps

tl;dr: An indicator to show the progress of a Power Automate flow

Especially when users need to perform several tasks to complete a workload, they like to know, if the thing worked. Simple notifications like “your request has been submitted” still leave them in some uncertainty in regards of the progress of said process. Learn here how a simple SharePoint list can help you to achieve exactly that.

walkthrough in Power Apps

First idea: Respond to Power Apps

In Power Apps, we can start Power Automate flows and even get a response back, Lewis Baybutt recently blogged about how to Notify users if the flow ran successfully. But what if the flow has several big steps and we want to inform users along the way in Power Apps? Unfortunately, we can’t use the Respond to PowerApps action more than one time in a flow, which means that this is already out of the game.

Second idea: External datasource to the rescue

But what if we logged steps/status of our flow into an external table and update our app from there? This could be a Dataverse table, a SharePoint list or whatever makes you happy.

In total we will need

SharePoint list setup

I used a SharePoint list called LogList in which I need 3 columns:

  • Title (comes already out of the box)
  • GUID (single line of text, to hold a GUID that we get from Power Apps as we want to use LookUp to get the right flow run)
  • Status (number, to hold the status/step of the flow progress)

Power Apps setup

In our Power App, we need

  • a button which will start the flow
  • a timer which will take care of refreshing
  • a gallery to indicate progress

For everything, that needs to be repeated, I use a gallery in Power Apps. The effect on time to build, design consistency and performance is really amazing.

  • Set the Items property to
Table(
{
Id: 1,
Value: "validated data",
Icon: Icon.Check
},
{
Id: 2,
Value: "approval pending",
Icon: Icon.Check
},
{
Id: 3,
Value: "approval granted",
Icon: Icon.Check
}
)
  • Add a Label, a Rectangle, an Icon, a Circle to the Gallery
  • Set the Text property of the Label to ThisItem.Value
  • Set the Visible property of the Rectangle to If(loc_currentStatus.Status>=ThisItem.Id, true, false)
  • Set the Fill property of the Circle to If(loc_currentStatus.Status>=ThisItem.Id, Self.BorderColor, Transparent)
  • Set the Visible property of the Icon to loc_currentStatus.Status>=ThisItem.Id
  • Set the Icon property of the Icon to Icon.Check

Button

Our Button shall kick of the flow and pass in a unique ID

  • Set the OnSelect property of the button to
//create GUID
Set(gbl_stateGUID,GUID());
//start Power Automate Flow
flowStatus.Run(gbl_stateGUID)

Timer

We could of course build a refresh button as well for all impatient users, but a hidden timer is way more elegant.

  • Set the OnTimerEnd property to
Refresh(LogList);
UpdateContext({loc_currentStatus: LookUp(LogList,GUID=Text(gbl_stateGUID))})
  • Set the AutoStart property to !IsBlank(gbl_stateGUID)
  • Set the Duration property to 500 (ms)
  • Set the Repeat property to loc_currentStatus.Status<>3

Reset button

For testing purposes its really nice as well to have a Reset button

  • Set its OnSelect button to
UpdateContext(
{
loc_currentStatus: Patch(loc_currentStatus,
{
Status: 0,
Title: "you submitted"
}
)
}
);
Set(gbl_stateGUID,"");

Power Apps canvas app

Power Automate flow setup

  • Create a new flow from within Power Apps Studio, which automatically gives it the right trigger
  • Create an item in your SharePoint list, pass in the GUID from Power Apps in the GUID column and set the status to 0
  • Now add a scope and perform the actions you want to perform in this scope. To mock this, I added a delay
  • After this first scope, update the list item with a status message in the Title and set the Status to 1
  • Add another scope and perform the actions you want to perform in this scope. To mock this, I added another delay
  • After this second scope, update the list item with a status message in the Title ands et the Status to 2
  • Add another scope and perform the actions you want to perform in this scope. To mock this, I added another delay
  • After this third scope, update the list item with a status message in the Title and set the Status to 3

flow overview

Conclusion and What’s next

This is how you pass values between Power Apps and Power Automate and hook them into a nice looking UI. For flows that run for quite a while, its a nice way to inform users in-app and not to rely on sending Adaptive Cards or other notifications. I am curious: Which scenarios do you see? Let me know on twitter

UI

If you found this blog post useful, please also subscribe to my newsletter - news coming about every 2 months, I promise to not spam you!

Published on:

Learn more
Need help with this product?

We can help you with How to implement a Power Automate progress indicator in Power Apps

If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.

Luise Freese: Consultant & MVP
Luise Freese: Consultant & MVP

Recent content on Luise Freese: Consultant & MVP

Share post:

Related posts

You are holding GitHub Copilot Wrong!

Most developers think that one can’t really use GitHub Copilot wrong. There is a chat interface that lets you also choose a model, so th...

8 months ago

You are holding GitHub Copilot Wrong!

Part 0 showed why constant prompting, re-prompting, and steering GitHub Copilot feels fragile. Not because Copilot is unreliable, but because ...

8 months ago

Building a Multi-Hierarchy Ticket Classification System (Because Keywords Aren't Enough)

Look, I love a good keyword-based system as much as the next developer. They’re fast, predictable, and when your user says “VPN,&r...

8 months ago

Secretless cross-tenant dataverse access

Client secrets are like hiding your house key under the mat; easy to grab and impossible to audit. Certificates are just slightly better, beca...

10 months ago

How Azure CLI handles your tokens and what you might be ignoring

Running az login feels like magic. A browser pops up, you pick an account, and from then on, everything just works. No more passwords, no more...

10 months ago

How Dev Proxy teaches you to make your apps more resilient

I added Microsoft Dev Proxy to my Mermaid → Dataverse converter, because I wanted to test how it handled rate limits and API errors. What I go...

10 months ago

Building Azure functions that never store secrets — ever

What if your function could hit Microsoft Graph with no client secrets, no certs, and no Key Vault entries? That is exactly what a Managed id...

11 months ago

Introducing Mermaid to Dataverse Converter

Why diagrams matter (and why they usually fail us) Entity-Relationship Diagrams (ERDs) are the universal shorthand for talking about data mode...

11 months ago

It’s OK to be seen trying

It’s OK to be seen trying Somewhere along the way, we started believing that you’re only allowed to speak after you’ve figured everything out....

1 year ago

Stuck in pilot - Part 1: no foundations, no future

“We just need to test the AI. We’ll figure out the data later.” That sentence has quietly killed more AI pilots than any model failure ever ...

1 year ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.