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 / Update an item in a co...
Power Apps
Suggested Answer

Update an item in a collection and then refresh the gallery that displays them

(0) ShareShare
ReportReport
Posted on by 217 Season of Giving Solutions 2025
I have a canvas app running off a sharepoint list, on start the app creates a collection from the list and displays it in a gallery.
Users can update items from the list and that is a patch to the list item and also a patch to update the item in the collection.
The problem I am having is when the screen goes back to the gallery screen, it is not showing the updated values for the collection item that was just updated.
 
What is the best way to update the collection item that has been edited and then refresh the data in the collection before the gallery displays for the user, thanks
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,260 Super User 2026 Season 1 on at
     
    This is a classic issue when you patch SharePoint and then return to a gallery backed by a cached collection.
     
    Once you patched the data like this its just example patch statement
     
    Patch('Your SharePoint List',Default(),{}) 
     
    Before you navigating to the gallery screen update the formula.
     
    Refresh('Your SharePoint List');
    ClearCollect(yourcollectionname used in item property of gallery, 'Your SharePoint List');
    Navigate(GalleryScreen, ScreenTransition.None);
     
    This will resolve your issue.
     
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
     
     
     
  • senna Profile Picture
    217 Season of Giving Solutions 2025 on at
    Thanks @MS.Ragavendar, i was hoping not to have to build my whole collection again, is it not possible to just patch the updated item to the collection and then have the gallery display the updated collection?
  • MS.Ragavendar Profile Picture
    7,260 Super User 2026 Season 1 on at
    1.   SharePoint is your datasource -right ?
    2.   In PowerApps you creating a collection based on the SharePoint list and you bind the collection to the gallery.
    3.   From gallery you are editing the item and updating the data in to the collection and saving back to rendering to the screen.
    But the data will be available online offline, what i mean is collection are not persistent storage of table when you close the app the data will not reflected in the backend.
     
    • From Gallery - > Edit - > Save the data back to SharePoint list.
    • Refresh the dataSource using Refresh('your data source')
    • Try clear collect after refresh  and Navigate() or in the gallery screen on visible - ClearCollect()
    This would be best practice.
     
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
     
  • Suggested answer
    Power Platform 1919 Profile Picture
    2,245 Super User 2026 Season 1 on at

    Hi @senna,

    You can directly update the collection using the UpdateIf function ,that way you don’t need to rebuild the collection each time.

    My general pattern looks like this:

    If(
        !IsBlankOrError(
            Patch(list, ... )
        ),
        UpdateIf(
            collection,
            id = rowidentifier,
            { ... }
        ),
        false
    )
    

    This ensures the collection is only updated when the item is successfully patched, which helps avoid unnecessary recreation of the collection. It’s a lightweight approach that keeps things efficient.

    Hope that helps!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 404

#2
timl Profile Picture

timl 344 Super User 2026 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

Last 30 days Overall leaderboard