web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power App Gallery not ...
Power Apps
Unanswered

Power App Gallery not updating as expected when Automate returns value

(0) ShareShare
ReportReport
Posted on by 25

Scenario: I have a gallery that with thumbs up and thumbs down icons that one can vote on the suggestion submitted. Following is what I have in the app:

  1. Stand alone canvas app.
  2. Data connection is SharePoint list.
  3. OnStart collection = ClearCollect(colvotes, ListName)
  4. Gallery Items = colvotes
  5. Two Icons - thumbs up and thumbs down in gallery

Issue: I would like not to have to refresh the whole list, but only have the collection vote piece updated for said Item being voted on.

 

What has worked when tied directly to the list: My Gallery items = ListName. In my Gallery have two icons thumbs up and down for my Onselect (will us thumbs up): Set(varItem, ThisItem); Set(varvote, UpVote.Run(ThisItem.ID)); Refresh(ListName) When Automate runs the Gallery gets refreshed and shows the correct number of votes for said item. However, would rather not have to do refresh for right now its quick but say list gets to be 2K big it will be slower to run.

 

What isn't working when I change things to a collection: I have set for the Gallery items = colvotes. For my Thumbs up icon Onselect = Set(varitem, ThisItem); Set(varvotes, UpVote.Run(ThisItem.ID)); UpdateIf(colvotes, ThisItem.ID = varitem.ID, {Voting: varvotes.voting})

In my automate its got the response to Power Apps so I can get back the voting number for said item. However, what takes place with the one not working for me is it updates all my Gallery ThisItem.Voting fields through the whole Gallery. Example first gallery item has 10 votes second gallery item has 3 votes. I upvote the first gallery item which then makes it to 11 as it should, but my second gallery item now shows 11 too. It doesn't change what is stored in SharePoint list, which is what I want in Power Apps to see the updated number, just changes what is shown in Gallery.

I feel like I'm close and on the right track just got to end of day after doing various try's and at a stuck point.

 

Thank you for taking a look 😊

Categories:
I have the same question (0)
  • zmorek Profile Picture
    3,272 on at

    Is the flow to purely increment/decrement the number of votes on a given record? You should be able to accomplish this without flow, if that's the case.

     

    For example, an upvote on a given record can be increased with:

     

    Patch(DataSource, ThisItem, {Voting: ThisItem.Voting+1})

  • craig_gregory Profile Picture
    25 on at

    @zmorek thank you for the suggestion.  I tried it out and yes does update the gallery.  The downside is when two people are in the app and vote on the same item it gives the, "Network error when using Patch Function: Conflicts exist with changes on the server, please reload."  I'm trying to avoid if possible doing the function "Refresh" just to have my gallery showing the correct voting number once someone votes.  Appreciate your help and insight 😊  

    Update:  Seems even though thought my automate solution would not create same error it does.  How would I handle making sure when someone one clicks button getting the current vote number from my SPO list?  I know it might be far and few between that two crew will upvote at same time but is possible.

     

    Update 2:  So if I do Refresh(ListName); Patch(ListName, ThisItem, {Voting: ThisItem.Voting+1}) that works just fine as long as two people don't hit the upvote at the same time.   I'm still not thrilled with having to use the Refresh function.

    Any suggestions how to handle when two people hit the upvote button at same time in my gallery?  Any suggestions around if have to stick with "Refresh" or is there a better solution?

    Look forward to all suggestions.  😊

  • craig_gregory Profile Picture
    25 on at

    After much dedication I got it all worked out and functioning. 😁

  • C_J Profile Picture
    2 on at

    Hi @craig_gregory 

    Are you able to detail how you got this working? Did you have to implement a Refresh or another solution?

    I currently have a flow updating data and if a user keeps a form open then they receive the same error Network error when using Patch Function: Conflicts exist with changes on the server, please reload.

    Thanks 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard