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

Create empty collection

Is it possible to create an empty collection?

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Create empty collection

Hi @ck25415 

 

ClearCollect(colEmpty,Blank())

 

This will create a empty collection with a column called "Value"

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

5 REPLIES 5
hnguy71
Level 8

Re: Create empty collection

You can create a collection with no data if that's what you need. For example:

ClearCollect(SampleCollection,
{
    Field1: Blank(),
    Field2: Blank()
});
Dual Super User
Dual Super User

Re: Create empty collection

Hi @ck25415 

 

ClearCollect(colEmpty,Blank())

 

This will create a empty collection with a column called "Value"

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Highlighted
Super User
Super User

Re: Create empty collection

Hi @ck25415 ,
For an absolutely blank Collection, you can do ClearCollect(colTestBlank, {}). The results of this one are:

image.png

Community Support Team
Community Support Team

Re: Create empty collection

Hi @ck25415 ,

Could you describe more clearly about the empty collection's structure?

Does the collection have fields?

Which do you extrally want

1)have fields with empty value?

2)have no field?

3)something else?

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ck25415
Level 8

Re: Create empty collection

@RezaDorrani Thanks, that worked. I tried ClearCollect(emptyCol,"") and other suggestions from this post but the count  showed 1 even though there are no items in the collection.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,345)