cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AllanMartins
Advocate II
Advocate II

How to remove/delete a collection?

I have created a temporary collection that I no longer need. How can I remove it?

 

Clear/ClearCollect/RemoveIf only removes the records from it. I would like to actually delete the collection.

 

thank you,

15 REPLIES 15
PowerunAppy
Kudo Collector
Kudo Collector

Am I correct in understanding that you want to do is to drop the Collection (if I may use an SQLism), and you're being told how to delete rows within  the collection?

 

I'd also be very happy to know how to drop a Collection as well.

RickDatel
Advocate I
Advocate I

To remove a collection from Power Apps you must clear the collection, this can be done via exiting or using Clear(CollectionName), you must then remove any references to it.

Once all the references to a collection have been removed the collection will disappear from your app.

I had collection stuck in an app once that was collecting images, I found that I had accidently placed a collect on the OnVisible property for a screen I had duplicated a few times, very annoying.

Hi:

 

I left the suggestion below on the Ideas area of this site.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Command-to-explicitly-drop-a-collection-in-Power...

 

Please let me know your views; and if you approve of the general idea, feel free to vote it up.

--

Regards

P

Oh my god, this is so hilarious.  You have to be kidding me right?  You have to back your way out of any and all references to remove a collection?  No way to do it directly?  Unbelievable.  We shouldn't have to add this request to any wish list.  Who's running the developer crew for this app?

 

Not only that, but this relatively trivial request has gone over a year and a half without being addressed.  WOW!

There is no way to dynamically remove a collection like you would with a call to free() in C++ or DROP TABLE in SQL, so long as the reference is in the code, it stays.  The best you can do is to use the clear() function to at least shrink the memory footprint the app uses.  Granted, the memory restraints nowadays in cloud computing is quite minimal so I guess they figure, why bother with such a call.

Couldn't agree more. When you combine this awful behavior with the inability to search for the references efficiently in the web-based "IDE", it's painstaking to remove all of the references if the collection is widely used.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,289)