cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrittanyR
Helper III
Helper III

PowreApps collection not cleared after closing the form

I closed the form, closed the browser, started it again, and I still see 4 collections when I go to File > Collections. 

 

I would like to reset my collections (remove them), because I added few columns in SharePoint, my data connection is updated, however my collection that's based on this data connection isn't picking up the new columns, I ran the clearcollect again, it's getting the new items from the SP data connection, but not getting the new columns. Any way to refresh the collection to pickup the new columns from the SharePoint connection? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @BrittanyR :

Do you want to remove these four collections?

The only way is to delete the formula that defines them.(If you use multiple formulas, you need to delete all of them)

Just delete the formula that defines them, and then confirm that they have disappeared in File-Collections, then you can create a new collection with the same name.

19.gif

Best Regards,

Bof

View solution in original post

11 REPLIES 11

You see the collections? Do they contain data?

You will see the collections, but if you haven't collected anything to them, they should not contain data. Did you have the app open in editing mode? Sometimes I see that in editing mode if it is open in another window, but if you close your browser window and reopen the app you should see a blank collection.

 

you could also add some event on on visible property to clear the collection if you want it to be cleared out at some point.

eka24
Super User
Super User

Does it mean those Column were recently added. Try removing the Sharepointlist in Powerapps then reconnect the list again.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24My issues isn't with the SP data connection itself, when I view the data connection, it has my new columns. The problem is with the collection itself, when I save the "connection" to my "collection", the columns aren't copied It's like the collection is caching the schema, and columns aren't updated. 

Thanks @jlindstrom I see empty collection, but the columns aren't updated from my SharePoint connection. I have 2 sharepoint lists, and I want to store one of them in my collection based on a specific condition. The 2 lists have the same set of columns, but different data. I wanted to check for certain condition and based on that save the items in a collection. It was working when I created the collection the first time. Now I updated the columns in the data connection, but the collection isn't aware of this. The only solution I have so far is recreating the collection with a new name and that will work. 

 

Can you indicate the formula you are using for the Collection. Is the Collection located OnStart

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

On start am always clearing the collection. Then on a button click, am doing something like this: 

ClearCollect(myCollection, If(someVar="A", 'SP Connection 1', 'SP Connection 2'));

 

So I am expecting when SP Connection 1 to be updated with new fields and I run this function, to update the myCollection collection with new values/columns. 

 

If  'SP Connection 1' and

'SP Connection 2' are SharePoint list, then my earlier suggestions of reconnecting still applies.

I also don know how the variable is created

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Reconnecting what? How? My SP connection already has the right columns. I'd like to reconnect my collection to my connection from scratch, is there a way to do it without having to rename the collection? 

 

 

 

My reason is based on your original post 

I would like to reset my collections (remove them), because I added few columns in SharePoint

Is it too difficult to give my suggestion a trial?

 

I also asked how you came about the variable

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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