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
Responsive Resident
Responsive Resident

@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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (5,119)