cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wsalling
Helper III
Helper III

New collection from another collection

i have one collection that has say 12,000 records in it.  I want to take the first 4000 records and create a new collection of just these.  There is nothing in the collection that i can filter on, it just the first 4000 items.  First does not work because i cannot give a count to it.  What other way can get this done.  

1 ACCEPTED SOLUTION

Accepted Solutions
wsalling
Helper III
Helper III

NeverMind.  Brain Fart...

View solution in original post

2 REPLIES 2
wsalling
Helper III
Helper III

NeverMind.  Brain Fart...

Krishna92
Microsoft
Microsoft

@wsalling 

 

You can create collection with specific amount of rows using the FirstN function.

In the FirstN function you can specify the number of rows that you want to be extracted and based on that you can create a new collection.

 

You can check the documentation for reference regarding the same.

 

I am also pasting the sample data so that you can use it as reference.

ClearCollect(test,{index:1},{index:2},{index:3},{index:4},{index:5},{index:6},{index:7}) - Create collection

 

ClearCollect(testa,FirstN(test,5)) - Filtered collection.

 

If the information helps you, please consider giving a thumbs up and mark solution as resolved.

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (1,897)