web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collection is not cleared
Power Apps
Answered

Collection is not cleared

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

My collections are not cleared even after closing the app and the browser.

They retain all the columns but are empty (no records).

2020-02-25 16_36_25-Clipboard.png
Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    Your collection is cleared.  The collections viewer is simply showing the column headings of what the empty collection looks like.  This is a necessary feature because it allows us to validate the a collection holds no values.

     

    The collection will continue to appear in the collections viewer so long as there is at least one reference to it in your code.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks, but what is wrong with my app then? It consist of a single button, by pressing which I wan't to operate some SharePoint lists. Lets say I do:

    Clear(z3);
    ForAll(z1,Collect(counter,Last(counter).Value+1);
    Collect(z3,{
    SignalTypeId:Last(FirstN(z1,Last(counter).Value)).Value,
    DatasetId:Last(FirstN(z2,Last(counter).Value)).Value
    }));


    ClearCollect(z1,AddColumns(z3,"SignalType",LookUp(SIGNAL_TYPES,SignalTypeId=z3[@SignalTypeId],SignalType)));
    where SIGNAL_TYPES is a SharePoint list.
    Last line gives me the error that SignalType already exists, although I just created z3 with only two columns SignalTypeId and DatasetId.

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    No clue.  You should create a new post focusing on explaining the actual problem you are having rather than what you believe the solution to be.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard