cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

COLLECTIONS: Not refreshing last two days

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: COLLECTIONS: Not refreshing last two days

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

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User II
Dual Super User II

Re: COLLECTIONS: Not refreshing last two days

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

Highlighted
Super User
Super User

Re: COLLECTIONS: Not refreshing last two days

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)

Highlighted
Community Support
Community Support

Re: COLLECTIONS: Not refreshing last two days

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 Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: COLLECTIONS: Not refreshing last two days

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

 

@Anonymous 

Highlighted
Super User
Super User

Re: COLLECTIONS: Not refreshing last two days

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

View solution in original post

Highlighted
Anonymous
Not applicable

Re: COLLECTIONS: Not refreshing last two days

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

 

@Anonymous 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (3,766)