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 / Creating a Collection ...
Power Apps
Answered

Creating a Collection of > 2000 items of SQL Table

(0) ShareShare
ReportReport
Posted on by 3,347

I have a app that searches an SQL table of over 10,000 rows.  The lookups are very slow.  I want to pull that table into a collection so it speeds it up a bit.  However, the table is only 2,000 rows with clearcollect().  I thought that an SQL table was not like a sharepoint table.  That you could have more rows than 2,000.  We figured out how to get 4,000 rows from a SP table via this post:

 

https://powerusers.microsoft.com/t5/General-Discussion/Collections-maxes-out-at-2000-when-populating-with-SharePoint/m-p/179585#M59406

 

I was hoping to get a larger SQL table.  Perhaps I can make an index, and grab them 2,000 at a time using some GT/LT scenarios with the index.

 

More later... unless someone has a better idea.

Categories:
  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @martinav

    If your table has a numeric id column, you can use @mr-dangs technique here.

    https://powerusers.microsoft.com/t5/General-Discussion/500-item-limit-in-CDM-entity-search-filter-need-to-switch-to-asp/m-p/22980#M9872

    This uses the method that you describe, which is to grab the records in batches inside a ForAll loop.

    Out of interest, why do need to collect such a large number of records into your app? If you want to join records from multiple SQL tables for display purposes, could you not use a View instead?

  • martinav Profile Picture
    3,347 on at

    Yes!  That is what I was thinking about.  Nice to have the work all done, with a nice autmatic iteration counter.  Schweet!

     

    Many thanks.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard