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 / COLLECTIONS: Not refre...
Power Apps
Answered

COLLECTIONS: Not refreshing last two days

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Seems to be something going on with caching lately. Anytime I delete a record from a Sharepoint DataSource then recollect, the record is still present. The only way to clear it is to View/DataSources/Refresh. 

Anyone else experiencing this?

Example:

  • Gallery control
    • Items: colTest
  • Delete Icon (in Gallery)
    • OnSelect:
      • Remove(SHAREPOINT_DATA_SOURCE, ThisItem, All);
        • Also tried RemoveIf(SHAREPOINT_DATA_SOURCE, ID = ThisItem.ID)
      • ClearCollect(colTest, SHAREPOINT_DATA_SOURCE)
  • Collection colTest still shows the deleted record though the Sharepoint list shows it deleted.
  • View/DataSources/Refresh then ClearCollect(colTest, SHAREPOINT_DATA_SOURCE) AGAIN and everything is synced.

PowerApps: Editor (not tested in app yet)

Editor Version: PowerApps 3.19082.20

SessionID: aa87e252-64e4-4ca9-9b6c-583d19d55a29

Location: WestUS

Categories:
  • RezaDorrani Profile Picture
    12,145 on at

    Hi @ericonline 

     

    just made a simple test and it worked

     

    OnVisible - ClearCollect(colData,list)

     

    Button click - Remove(list,First(colData));ClearCollect(colData,list)

     

    List item got deleted and collection did not show that record

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This was the issue:

    Remove(SHAREPOINT_DATA_SOURCE, ThisItem, All) needed to be changed to:

    Remove(SHAREPOINT_DATA_SOURCE, LookUp(colTest, ID = ThisItem.ID), All)

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @ericonline ,

    I have tested these two formulas:

    Remove(SHAREPOINT_DATA_SOURCE, ThisItem, All) 

    Remove(SHAREPOINT_DATA_SOURCE, LookUp(colTest, ID = ThisItem.ID), All)

    and all not met the problem like your description.82912.PNG

    Please clean your browser's cache,update it to the latest version and try again.

    What's more, the network condition is also important.

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @ericonline are you still experiencing this issue with Collections? 

     

    @Anonymous 

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the follow up @Anonymous . 
    I had the issue in 2 apps. My reply above solved the the first issue. Here is how I solved the 2nd issue:

    Screen 1: 

    • OnVisible: ClearCollect(colTest, SHAREPOINT_LIST)

    Screen 2:

    • OnSelect of "Submit" button:
      • Patch(SHAREPOINTLIST, LookUp(SHAREPOINT_LIST, ID=varID), {AddRemove: "Remove"})
      • RemoveIf(colTest, ID=varID)
      • Navigate(Screen1, Cover)

    Flow:

    • When a record is created/modified in SHAREPOINT_LIST, fire off Flow
    • In this case, when the AddRemove column is changed to "Remove", do things.
    • BUT... the Flow takes ~30secs to 1min to run

    The astute PowerApper can see why "the record is not being removed from the collection". Because OnVisible of Screen1, the record still exists in the SHAREPOINT_LIST. 

    Solution:

    • I moved the RemoveIf() to Screen1 OnVisible AFTER the ClearCollect.
    • Now the record with ID=varID is correctly removed from the Collection
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the follow up @ericonline! This should be extremely useful for any other users who run into this issue

     

    @Anonymous 

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard