Showing results for 
Search instead for 
Did you mean: 
Responsive Resident
Responsive Resident

Gallery not updating in real time.



I am currently having an issue with Dynamics as a data source.


I have an app, which enables a user to add a new weight measurement for an animal.  The weight is a custom entity on D365, and is linked to the animal, another custom entity. Within the animal entity, there is a field called Current Weight Date, which populates itself from the most recently added weight linked to that specific animal from the Weight entity.


Adding a new weight works fine, and listing old weights also works perfectly. 


I am trying to get the animals that have already been weighed on a day to remove from the gallery of animals but this is currently not working. I have checked the entries, and they are populating D365 as expected, and filling out the related field, but the gallery is not updating in real time.


The gallery does not refresh when navigating back to the gallery after adding the weight, and also does not work on the click of a refresh button, which is set to refresh both the Weight and Animal entities as data sources. The Refresh function is in the formula of the navigation after the weight is added as well.


The gallery only updates if a user exits the list of animals back out to a previous screen which chooses the barn where the animals are located, and re-selects the barn. The gallery then does not show those animals with a Current Weight Date of today.


The back and forth is really not practical, as some barns hold well over 100 animals.


The gallery items formula is as follows;


SortByColumns(Filter(Animals,currentbarnid_value='FS Barn Dropdown'.Selected.barnsid && 'Current Weight Date'<> Today() && StartsWith(animal_name,'FA Text Search Box'.Text)),"animal_name")


Can someone shed any light? Any assistance is appreciated.



Dual Super User III
Dual Super User III

Re: Gallery not updating in real time.

Hey @MattyH 


Can you try to create a variable to handle the barn selection on the previous screen. This way you can set the variable as blank and then reset it again.
Barn Dropdown:
OnChange -> Set(SelectedBarn, 'FS Barn Dropdown'.Selected.barnsid)
OnSelect -> Set(SelectedBarn, 'FS Barn Dropdown'.Selected.barnsid)
When you save the new weight details:
Refresh(Weight);Refresh(Animals);Set(SelectedBarn,Blank());Set(SelectedBarn,'FS Barn Dropdown'.Selected.barnsid)
I assume that the dropdown is not reset during this process.
Gallery Items:
SortByColumns(Filter(Animals,currentbarnid_value=SelectedBarn && 'Current Weight Date'<> Today() && StartsWith(animal_name,'FA Text Search Box'.Text)),"animal_name")
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Responsive Resident
Responsive Resident

Re: Gallery not updating in real time.

Hi @yashag2255 ,

Thanks for the swift response. I have tried your suggestion, and still getting the same issue. The weights are adding, and are listed in the correct order, but those animals weighed today are not removed from the gallery list.




Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,689)