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,

1 ACCEPTED SOLUTION

Accepted Solutions
Brank
Advocate III
Advocate III

Clear function should work for you for delete all records in the collection and no just one.

 

Something like this: Clear(Collection1)

 

You can use it in a "OnClick" property of a button or on "OnVisible" property of a screen.

 

Regards,

View solution in original post

15 REPLIES 15
hpkeong
Community Champion
Community Champion

Hi

 

When you close the apps, the Collection will disappear. (Please click on Content.Collection confirm).

Meantime, please remove the formula with the related Collection DS Name.

 

Hope this helps,

hpkeong

Thank you for you response, I closed the app, and the collection remain. I went all the objects and removed any reference and still keep the collection.

 

I used the Find (Ctrl + F) to identify anything with the Collection name, and there is nothing there associated with this collection.

 

Any other way to delete it?

 

Hi

 

Sorry for late reply.

May you als try to Sign-out and Sign-in again and see what happened?

Collection is a temporary datasource.

 

Please check again. TQ

hpkeong

Hi Allan,

 

Like @hpkeong mentioned, collections should be deleted as you close the current app. I suggest that in PowerApps desktop studio, you can open another app which will make sure that this app is closed. And then try to open this app again, see if this will delete the collection.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hpkeong
Community Champion
Community Champion

Hi

Addtional point as mentioned by @v-monli-msft, close the apps totally.
File.Close...close selection is located at left bottom.

Tq
hpkeong
Brank
Advocate III
Advocate III

Clear function should work for you for delete all records in the collection and no just one.

 

Something like this: Clear(Collection1)

 

You can use it in a "OnClick" property of a button or on "OnVisible" property of a screen.

 

Regards,

I had one button (I used for testing, and I Left it Hidden...) that had reference to that Collection, simply by deleting it, it solved the problem! thanks a lot!

Anonymous
Not applicable

I dont Want My collection to be deleted even after i closed the app . Can anyone help me with this?

If you want data to persist between application runs I think you need SaveData/LoadData.

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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,558)