Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

Power Apps Refresh Function (6 Practical Examples)

If you want a Power Apps gallery to show the rows other people just added to a SharePoint list, the Refresh function does exactly that. It takes one data source, reloads it and returns nothing, so every gallery, form or label that reads that source shows the current data.

Power Apps keeps a copy of the data and doesn’t go back for more on its own. Refresh works only in behavior formulas, like a button’s OnSelect.

In this tutorial, I’ll show you how to use the power apps refresh function with a refresh button, a screen’s OnVisible, Patch, collections, a status message, and a timer. I tested every formula in a real canvas app against a SharePoint list.

Power Apps Refresh Function Syntax

The syntax has one argument:

Refresh( DataSource )
ParameterRequiredTypeDescription
DataSourceYesData sourceThe connected source to reload, such as a SharePoint list, a Dataverse table or a SQL table.

Return value: none. Refresh doesn’t give you a table or a true/false result. It only reloads the data, and every gallery, form or label that reads that source shows the new rows.

Because it changes app state, Power Apps allows Refresh only in behavior formulas: a button’s OnSelect, a screen’s OnVisible, a timer’s OnTimerEnd, a form’s OnSuccess. Delegation doesn’t apply to Refresh itself; each formula that reads the source keeps its own delegation rules.

Pro Tip: Refresh is for changes made outside your app, by other users, a flow or someone editing the list in SharePoint. Changes your own app saves show up without it, as Example 3 proves.

When to Use the Refresh Function in Power Apps

  • Several people work in the same list and each needs to see the others’ new items.
  • A Power Automate flow or a SharePoint rule writes rows in the background.
  • Users come back to a list screen and should always see the latest data; see OnStart vs OnVisible for when each one runs.
  • A wall display or kiosk app should reload every few seconds without anyone clicking.
  • You want a clear “Refresh” button so users can pull fresh data whenever they want.

Example 1: Add a Refresh Button to a SharePoint Gallery

I built a new screen, scrRefreshFunction, in our responsive Power Apps demo app. It uses the modern Header and footer layout from the New screen menu, with cards placed in the main container.

New screen menu in Power Apps Studio with the Header and footer layout boxed

The first card holds a gallery on our IT Help Requests SharePoint list, newest item first, and a label that counts the loaded rows:

Sort('IT Help Requests', ID, SortOrder.Descending)

"Rows: " & CountRows(galRxList.AllItems) & "  |  Newest: " & First(galRxList.AllItems).Title

To add a formula, select the control in the Tree view, pick the property (here OnSelect) in the dropdown left of fx, and type in the formula bar. Press Play (F5) to test it. The Refresh list button gets this formula:

Refresh('IT Help Requests')
Refresh formula in the OnSelect property of the Refresh list button

Then I played another user. With the app running, I added the item “Demo refresh – Outlook keeps asking for password” (ID 42) straight to the SharePoint list. The app didn’t notice:

Preview still showing 26 rows after a new item was added in SharePoint

One click on Refresh list, and the new item jumped to the top:

Preview showing 27 rows and the new item on top after clicking Refresh list

How does this work?

Refresh threw away the app’s cached copy of IT Help Requests and loaded it again. The gallery reads that source, so it redrew itself: the label went from “Rows: 26” to “Rows: 27 | Newest: Demo refresh – Outlook keeps asking for password”. This is also the answer to “refresh gallery”: you refresh the gallery’s data source, not the gallery.

Example 2: Refresh Data When a Screen Opens (the “Refresh Screen” Fix)

People often search for a way to refresh a screen on a button click. Power Apps has no screen refresh function. Screens show live formulas already; what goes stale is the data behind them. So you refresh the data when the screen appears.

Select the screen in the Tree view, pick OnVisible, and enter:

Refresh('IT Help Requests')
Refresh formula in the OnVisible property of the scrRefreshFunction screen

To test it, I added “Demo refresh – Badge reader dead at front desk” (ID 43) in SharePoint, clicked Open another screen, then came back with a Back() button.

Preview after returning to the screen with the new item 43 loaded by OnVisible

How does this work?

OnVisible runs every time the screen becomes visible, so the return trip reloaded the list: “Rows: 28 | Newest: Demo refresh – Badge reader dead at front desk”. As a control test, I cleared OnVisible, added another item and made the same trip. The gallery stayed at 30 rows. Navigating alone doesn’t reload anything.

Pro Tip: Studio’s Play button doesn’t fire OnVisible for the screen you’re editing. Navigate to it from another screen to test OnVisible.

Example 3: Do You Need Refresh After Patch or SubmitForm?

Many Power Apps tutorials put Refresh right after every save. I tested that. The Add demo row (Patch) button saves a new item and has no Refresh in it:

Patch(
    'IT Help Requests',
    Defaults('IT Help Requests'),
    {
        Title: "Demo refresh - Keyboard not working",
        Category: {Value: "Hardware"}
    }
)
Patch formula in the OnSelect of the Add demo row button with no Refresh call

Before the click, the collection card read “Collection: 28 rows | Gallery: 28 rows”. After one click:

Preview showing the gallery at 29 rows right after Patch without a Refresh

How does this work?

The Patch function sends the record to SharePoint and updates the app’s cached copy with the saved row. The gallery showed “Rows: 29 | Newest: Demo refresh – Keyboard not working” at once. If you save with a form, the LastSubmit property of a form gives you the saved record and its new ID.

So skip Refresh after your own saves. Add it only when something else changes the list too, such as a flow that runs after the save.

Example 4: Refresh a Collection (and Why It Fails)

Look at the same screenshot again: the collection still said 28 rows. My Load collection button copies the list into a Power Apps collection:

ClearCollect(colRxRequests, 'IT Help Requests')
ClearCollect formula in the OnSelect of the Load collection button

A label compares the two counts:

"Collection: " & CountRows(colRxRequests) & " rows  |  Gallery: "
& CountRows(galRxList.AllItems) & " rows"

Can Refresh reload the collection? I typed this into a button:

Refresh(colRxRequests)
Error Only managed connections can be refreshed on Refresh of a collection

Studio underlined it and said: “Only managed connections can be refreshed.” Clicking Refresh list didn’t help either; the card stayed at “Collection: 28 rows | Gallery: 29 rows”. Running ClearCollect again did it:

Preview showing collection and gallery both at 29 rows after reloading

How does this work?

A collection is a copy that lives only in the app, so there’s no connection behind it to refresh. That’s what “works only with data sources, not collections” means. ClearCollect empties the collection and fills it from the list again, which gave “Collection: 29 rows | Gallery: 29 rows”.

Pro Tip: For a gallery built on a collection, put the same ClearCollect formula in your Refresh button.

Example 5: Refresh Several Data Sources With a Status Message

There’s no “refresh all” function, so call Refresh once per source. This button reloads two lists, stores the time in a variable with the Set function, and confirms it with the Notify function:

Set(varRxBusy, true);
Refresh('IT Help Requests');
Refresh('Request Categories');
Set(varRxBusy, false);
Set(varRxLast, Now());
Notify("Data refreshed at " & Text(varRxLast, "h:mm:ss AM/PM"), NotificationType.Success)
OnSelect formula that refreshes two SharePoint lists and shows a notification

A label shows the last refresh time and the category count:

"Last refreshed: " & If(IsBlank(varRxLast), "not yet", Text(varRxLast, "mm/dd/yyyy h:mm:ss AM/PM"))
& "  |  Categories: " & CountRows('Request Categories')
Green Data refreshed banner and last refreshed time in Preview

How does this work?

Power Apps runs the formulas in order, top to bottom. Both lists reloaded, then varRxLast got the current time. The banner said “Data refreshed at 5:14:52 PM”, and the label read “Last refreshed: 11/19/2026 5:14:52 PM | Categories: 14”.

The varRxBusy flag shows a “Refreshing…” label while the work runs. With these small lists it finished too fast to see. On big lists, pair the flag with a loading spinner.

Example 6: Auto Refresh Every 30 Seconds With a Power Apps Timer

For a help desk wall display, nobody wants to click a button. A Power Apps Timer control can call Refresh on a schedule. Open Insert, search for “Timer”, and pick it:

Insert menu searched for Timer with the Timer control boxed

In the Properties pane, set Duration to 30000 (milliseconds), and turn on Repeat and Auto start:

Timer properties with Duration 30000, Repeat on and Auto start on

Then pick OnTimerEnd in the property dropdown and enter:

Refresh('IT Help Requests'); Set(varRxTicks, varRxTicks + 1)
Refresh formula in the OnTimerEnd property of the tmrRxAuto timer

I added “Demo refresh – Wi-Fi drops in Conference Room B” (ID 45) in SharePoint and waited:

Preview after the timer ended showing 30 gallery rows and three auto refreshes

How does this work?

The timer counts up to 30 seconds, runs OnTimerEnd and starts over because Repeat is on. When it ended, the gallery showed 30 rows with ID 45 on top and the counter read “Auto refreshes so far: 3”. More on the control in this Power Apps Timer tutorial.

Pro Tip: Keep the interval sensible. Every run is a call to SharePoint for every user who has the screen open. Auto pause (on by default) stops the timer when users leave the screen.

Common Mistakes with the Power Apps Refresh Function

  • Refresh in a label or Items property. I typed it into a label’s Text and got “Behavior function in a non-behavior property. You can’t use this property to change values elsewhere in the app.”
  • Refresh on a collection. It fails with “Only managed connections can be refreshed.” Run ClearCollect again instead.
  • A timer you forgot about. My first test looked like the gallery refreshed by itself. It didn’t. A running timer had called Refresh. Check for timers before you blame caching.
  • Refresh doesn’t fix row limits. It reloads the same query. A non-delegable Power Apps formula still reads only the first 500 rows.
  • Counting a SharePoint list. The CountRows function on ‘Request Categories’ returned 14 but showed a delegation warning: “The “CountRows” operation is not supported by this connector.” That’s fine for small lists only.

Wrapping Up

The Power Apps Refresh function takes one data source, returns nothing and reloads the data so you see other people’s changes. Put it in a button, a screen’s OnVisible or a timer, skip it after your own saves, and use ClearCollect for collections.

Browse all Power Apps functions, or read the Refresh function on Microsoft Learn.

Other Power Apps functions you may find useful: