cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FLOWPA
Advocate I
Advocate I

Gallery: refresh one or few records only ?

Within a gallery, the only refresh function is Refresh(datasource).


This seems a waste of resources, when there is only one or few records that I'd like to refresh. 

 

If my gallery is filtered to show only 5 records, and I use the Refresh(datasource) function, is the function going to refresh only the gallery displayed 5 records? Or it's going to refresh the entire datasource?

 

Any more efficient solution?

 

(I found this older post, but there were no answers with a solution.)

4 REPLIES 4
RandyHayes
Super User
Super User

@FLOWPA 
Is there a particular reason you are refreshing the data source??

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Pstork1
Dual Super User III
Dual Super User III

It will definitely refresh the entire data source each time you call that function.  But as @RandyHayes said is there a specific reason you are refreshing the data source?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


@RandyHayes wrote:

@FLOWPA 
Is there a particular reason you are refreshing the data source??



@RandyHayes @Pstork1 

In this case, the data source is a Google spreadsheet.

www.contoso.com > Google spreadsheet > PowerApps app

We have a website (external to PowerApps) that submits data into the spreadsheet. When a new row is added into the spreadsheet, PowerApps doesn't seem to be aware of the new row of data, that's when we refresh the app. Refreshing the whole data source, for 1 or few new appended rows doesn't seem efficient. 

I keep reading about users experiencing gallery performance issues. Refreshing the whole data source could be part of the problem. I don't have performance issues, because I make sure the gallery is built efficiently with filters and formulas. 

Pstork1
Dual Super User III
Dual Super User III

In your case there is no alternative other than refreshing the entire dataset.  Making sure you are using appropriate filters with delegable functions to retrieve the minimum required records will help.  But you will have to refresh the whole data source.  It has no way to know which records have been added and which are old other than comparing what it already has in memory.  That comparison would be more time consuming than refreshing the full data source.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,130)