cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zeku
New Member

Where to use the Collect function in PowerApps

I want to find out where the Collect function is used in PowerApps.
I want to delete the collection of "data", but it will not be deleted if the usage part of the Coolect function remains.

Is there any way?

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@zeku 

I guess what you're asking for, is how to search your app to find all formulas where you call the collect function.

If that's the case, there's no built in way to do that through the designer.

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/How-do-I-find-where-a-Collection-is-created/idi...

 

However, you could extract the source code for your app and carry out a search using VS Code (or other code editor).

View solution in original post

5 REPLIES 5
PG_WorXz10
Community Champion
Community Champion

Hi @zeku ,

 

Wherever you need group of data with multiple columns and rows you can user collection. 

If you want to delete the collection does it mean you want clear the collection or want it empty. You can use below formula for that. 

Clear(collectionName)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @PG_WorXz10

Thank you for answering.

I don't want to delete it logically, I want to delete it physically.
I want to delete all the settings of Collect, but can't I list them?

@zeku As @PG_WorXz10 had mention Clear will delete the collection. What do you really mean by deleting physically and not logically. Can you elaborate on this a bit more? 

timl
Super User
Super User

@zeku 

I guess what you're asking for, is how to search your app to find all formulas where you call the collect function.

If that's the case, there's no built in way to do that through the designer.

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/How-do-I-find-where-a-Collection-is-created/idi...

 

However, you could extract the source code for your app and carry out a search using VS Code (or other code editor).

Thank you everyone.


I didn't know that I could save Power Apps locally and open it in an editor.
I grep in the editor and found out all the places where Collect is used.

 

After deleting all Collect
I was able to confirm that the collection had physically disappeared.

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.

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.

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 (2,804)