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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,009)