cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xzDan
Resolver III
Resolver III

Bug: Gallery doesnt refresh anymore?

I have a gallery and clicking an item takes you to another screen. I use Patch() for new entries, and EditForm for editing. Once edited /added, I navigate back to the other screen with the gallery.

 

Only recently have I had complaints that the gallery does not auto refresh anymore and people need to pick another date (to update the gallery and then go back to the correct date), or refresh. This was not the case before.

I then tried to remedy it by setting the OnVisible property to Refresh(<Source>) and even now I am getting complaints it does not refresh, but it seems to when I use Edit mode, but not the Live version.

 

Is this something others are experiencing?

 

Edit: From testing, I think it is the gallery itself not updating, not the source.

22 REPLIES 22
StephenLAM
New Member

limited to show 2000 items, default is 500 items

2000.PNG

Boynog
Helper II
Helper II

Hi @xzDan,

 

The DataSouce of the Gallery should be the collection.

 

Then do the steps to refresh.

If you want to refresh a gallery you just need a collection. 

First Button (OnSelect) -> Refresh('Your DataSource')

Second create a collection after the refresh

 

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

virakones
Resolver II
Resolver II

@Boynog 

Thank you for the suggestion. This helped a problem I had.

I had a similar problem where my datasource and Patch formulas were correctly updating records but I had some DisplayMode logic rely on the Selected Item in a gallery.

That gallery control itself wasn't truly "refreshing", because I knew the datasource was itself was correctly updating the records, and it wasn't until I clicked away to another record in that gallery and then clicked back that it "refreshed" the gallerys Items view - again, the data was already updated before, but the gallery itself was not "refreshing".

My solution was to take the Items property of my Gallery that was originally filtering the datasource directly and add it to a ClearCollect right after my patch formula and a refresh on the datasource. A simple example something like:

Button OnSelect:
Patch(Datasource, {Column1: Value1});
Refresh(Datasource);
ClearCollect(colData, Filter(Datasource, [etc. etc..])

Gallery1 Items: colData

Solved: Re: Gallery Selected Item not refreshing, affectin... - Power Platform Community (microsoft....

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (69,062)