cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Collection is not cleared

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Collection is not cleared

@andrejs91 

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."

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Collection is not cleared

@andrejs91 

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."

View solution in original post

Highlighted
Regular Visitor

Re: Collection is not cleared

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.

Highlighted
Super User
Super User

Re: Collection is not cleared

@andrejs91 

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."

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,251)