web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery not refreshing...
Power Apps
Unanswered

Gallery not refreshing data after patch

(1) ShareShare
ReportReport
Posted on by 42

Hello,

 

I have a gallery that we use a barcode scanner to pull a single item from a gallery, then a button to patch to that order to increase by 1. I am having issues now as it scales where the Gallery does not update. I have a separate button where it refreshes the datasource (SQL server view), but my button that fills then refreshes the data source and clearcollects the collection is not updating!

 

here is my button code:

 

Patch('[dbo].[CPCOrderFinal]',First(Filter('[dbo].[CPCView]',ID=GalleryOrders.Selected.ID)),{Filled: DataCardValue4 + 1, User:User().FullName, date:Now()});Refresh('[dbo].[CPCOrderFinal]');ClearCollect(colorders,Filter('[dbo].[CPCView]',Gallery3.Selected.ShipID=ShipID));Reset(BarcodeScan)

 

Anyone have any ideas how I can correct this issue? Very urgent.

 

Thanks

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Pseifert ,

    Firstly, please check whether your data has beeen updated successfully to SQL Server.

    If not, then the problem shoule be about your patch function.

    If yes, that means that your SQL Server table did not refresh.

    Here's a issue about how to speed up refreshing data of SQL Server for your reference:

    https://powerusers.microsoft.com/t5/General-Discussion/Refresh-SqL-database-taking-ages/m-p/261519

    What's more, someone has met the similar issue. He said that make the app smaller will help.

    https://powerusers.microsoft.com/t5/General-Discussion/Power-Apps-SLOW/m-p/240902#M70666

     

    Best regards,

    Community Support Team _ Phoebe Liu

  • Pseifert Profile Picture
    42 on at

    The data is pushed to my Sql server tables, the gallery is not refreshing the change after patch. The patch, refresh, and clearcollect are assigned to the same button. It seems to refresh but the gallery is not reflecting it. Is there any way to scale so that this problem does not occur? I only pull in records based on the ID that is currently being worked on.

  • JKat Profile Picture
    25 on at

    Mine intermittently does this too. I stuck a Refresh and Collect in a a popup with a timer - OnTimerEnd it refreshed and collects. 

    I had trouble replicating it to be sure, but it seemed that even a second Collect on its own would suffice.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It looks like powerapps changed something with the refresh a few months ago. The behavior I see is similar to this but much worse.

    Refreshing shortly after a patch does not ever work. It only works when the refresh is not executed in the same block of code as the Patch or SubmitForm.

     

    Strange because everything used to work properly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard