Problem with the Refresh function in Gallery control - Power Apps
Have anyone have seen this problem with "Refresh" function? I created a view that consumed the information from the table in SQL server. For the browse gallery I used the view to show the information and the table I used it for update a status.
So far, I have the following status.
There are two records with status not approved by default and with no observations – This means that have status with color gray .
There are two records from the same employee and I changed the first record the toggle to “Yes – Approved” and when I saved the record I also refresh the table and view successfully.
The second record I added a “CPE observation” and the toggle I leave it as “No – Not approved” and the status color is change to red.
After saving the second record I refresh the table and also the view and the problem it’s that the first record that was in status “Yes – Approved” with status color green, automatically change it to red. I do not understand why a “Refresh” function could cause this, it’s doesn’t make any sense and for the Patch function I’m passing the unique Id from the record and it seems to do it correctly.
Here is some screenshots of each scenario from the first screen and second screen
Second screen - The save button from the second screen where the user updates the status.
First screen - Icons status change based on the CPE Observations (ThisItem.CPEComment) and status ThisItem.Status
I also tried to use the table as the source for the gallery control but that makes the gallery really slow, so I leave the view as data sources.
Please let me know if you need more details from my side to understand the problem.
Hi @WenYing94 , in the pictures I saw that you use Patch when Toggle is Checked or Unchecked, maybe there will be a conflict when the tables Refresh. If is possible, I recommend Patching everything in the "OnSelect" function of the save icon.
Hope It helps you, if i can help with other issue or share knowledge between us, you can send me private message