Categories: Microsoft Power Apps

Auto-refresh data in Power Apps

When you use galleries in Power Apps to display data from a data source you will need to consider refreshing data. As the data is updated by other users you might want to auto-refresh your data. This post described a pattern for this.

Display accounts in an app

I’ve created an app that uses the Accounts entity in my CDS as a data source and Accounts are being displayed.

My app has a form to add new accounts to my database.

This all is great when I’m the only user, however when there are multiple users you might run into some refresh issues.

As one app instance adds a new account the other users will not see this new item

Auto-refresh data with timer

To solve this issue I’m adding a timer to my screen displaying the gallery of accounts.

On the timer you will need to set the Auto Start and Repeat and set the OnTimerStart as shown above. this will load the data in a MyData variable. Now update the Gallery to use MyData instead of the Accounts data source.

Now as one user adds a new record.

After a while you will find that the gallery in both instances synchronises. To control the refresh rate of your app you could consider some of your timer settings.

Share
Pieter Veenstra

Business Applications and Office Apps & Services Microsoft MVP working as a Microsoft Productivity Principal Consultant at HybrIT Services. You can contact me using contact@veenstra.me.uk.

Recent Posts

8 top reasons to use Dataverse or SharePoint lists in the Power Platform

Why would you use Dataverse, if SharePoint lists gives you the option to avoid premium…

6 days ago

Filter by calculated fields in SharePoint using Power Automate

When you read items from a SharePoint list and you want to filter by calculated…

1 week ago

Expected String but got Null, when calling a flow from a Model Driven app

A few weeks ago I looked at calling flows from model driven apps. And for…

1 week ago

Get all your broken connections using Power Automate

To get all your broken connections in the Power Platform can be a challenge. In…

2 weeks ago

Customer Voice a.k.a. Forms Pro the database behind the magic

If you call Customer Voice still Forms Pro or not, have you ever looked into…

2 weeks ago

Many running flows in Power Automate

Recently I noticed that some of my flows end up with many running flows. Types…

3 weeks ago
%%footer%%