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 / New collection from an...
Power Apps
Answered

New collection from another collection

(0) ShareShare
ReportReport
Posted on by 114

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.  

Categories:
  • Verified answer
    wsalling Profile Picture
    114 on at

    NeverMind.  Brain Fart...

  • Krishna92 Profile Picture
    Microsoft Employee on at

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

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard