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 / My app is only pulling...
Power Apps
Unanswered

My app is only pulling the first 2000 records in some instances

(0) ShareShare
ReportReport
Posted on by 227

My SQL Database has 8000 records

And could have up to 20,000

In some cases, it's going to 2000 and stopping there

How do I fix this?

Categories:
I have the same question (0)
  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @jesenavaranjan 

    PowerApps limits the number of rows that it retrieves for performance reasons. A good place to get an overview on this is to read the 'Delegation' section of the documentation.

    https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/delegation-overview#delegable-data-sources

     

    If you could post the formula that you're using to pull in your records, someone here can maybe able to help adapt it to remove this problem.

     

    In many cases, it's not really necessary to pull in such large amounts of data because practically, 2000 records is too much to display on a screen. So it might be useful to understand why you want to pull all 8000 records into your app. Is it because (for example) you're using a combobox control and only the first 2000 records appear there?

     

    Another good thread to look at is the code that @ericonline posted here yesterday.

    https://powerusers.microsoft.com/t5/General-Discussion/Pulling-in-large-ish-SQL-tables/td-p/243777

  • jesenavaranjan Profile Picture
    227 on at

    The formula that is not working is this one: Once a new record is created, it is taking the ID and passing it through the form to show the form in edit mode - as further info is then used, this formula is as part of my submit


    Set(Identi,If(RisksForm.Mode=FormMode.New,
     First(
        SortByColumns('[dbo].[tbRisk]',
            "stDate",Descending)
            ).RiskID,Identi))


    But it is always showing the 2000 record

     

    Jese

  • jesenavaranjan Profile Picture
    227 on at

    Another formula I am stuck with is:

     


    SortByColumns
    (Filter('[dbo].[vwMilestoneSummary]',SearchInput.Text in Title, CodeSearch.Text in Code || Value(CodeSearch.Text) = MilestoneID,
     DateDiff(from.SelectedDate,ForecastDate) >= 0,
       DateDiff(ForecastDate,to.SelectedDate) >= 0)

     

     

     

    As DateDiff is not a delegable function...

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi Jese,

    For your first question (if I understand you correctly), if you've just added a record into '[dbo].[tbRisk]' through RisksForm, you can retrieve the Identi value of the record that you just inserted with syntax that looks like this:

     

    RisksForm.LastSubmit.Identi

     

    For your second question, I suspect you're using DateDiff here to overcome the SQL date filtering bug.

     

    https://powerusers.microsoft.com/t5/General-Discussion/Filtering-on-prem-SQL-data-source-by-date/td-p/6151

     

    If this is the case, there's an alternative workaround to this. If it's possible for you to modify your '[dbo].[vwMilestoneSummary]' view by adding an output column of ForecastDate which has been cast to the DateTimeOffset data type, you should be able to filter directly against that without the delegation warning.

     

     

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard