cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pseifert
Level: Powered On

Gallery not refreshing data after patch

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

4 REPLIES 4
Highlighted
Community Support Team
Community Support Team

Re: Gallery not refreshing data after patch

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

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Pseifert
Level: Powered On

Re: Gallery not refreshing data after patch

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
Level: Powered On

Re: Gallery not refreshing data after patch

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.

JordanChan
Level: Powered On

Re: Gallery not refreshing data after patch

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.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,626)