cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NigelP
Level 8

ClearCollect

Hi

 

Has something changed very recently (in the last couple of weeks) with Collections.

 

I am having problemsNewPrduct initialising Collections. If use Clear(mycollectionname) as the first thing I do in an app, then I get an error "Name is not Valid".

 

I never used to get this.

 

I have tried File -> Save followed by File -> Close followed by Opening the App again.

 

Can anyone help ?

 

Thanks

 

Nigel

2 REPLIES 2
NigelP
Level 8

Re: ClearCollect

Hi

 

An example :-

 

ClearCollect(myCollection)  works

 

but

 

Clear(myCollection);

If (condition,

Collect(myCollection, filter(.............)

 

Gives an error on the Clear Statement "Name Is Not Valid".

 

Regards

 

Nigel

Super User
Super User

Re: ClearCollect

Hi @NigelP,

It may be that somewhere in the app you have removed the button or icon that was used to Collect mycollectionname. Without the Collect or ClearCollect function defining the collection it doesn't exist. Obviously, you can't clear something that doesn't exist. To test this, put a button on a screen and Collect(mycollectionname, datasource).  I don't think you even have to actually collect it.

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,296)