Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

loadNextPage() function throwing error

(1) ShareShare
ReportReport
Posted on by 10

Hi,

 

We created dataset control in that to get to load all record in context faster we write below code. It working fine till yesterday but now we are getting error message on line of loadNextPage().

 

// code

if (!this._context.parameters.sampleDataSet.loading) {
 if (plotLib.isValid(this._context.parameters.sampleDataSet.paging.hasNextPage) && this._context.parameters.sampleDataSet.paging.hasNextPage == true) {
                    //set page size
                     this._context.parameters.sampleDataSet.paging.setPageSize(5000);
                    //load next paging
                    this._context.parameters.sampleDataSet.paging.loadNextPage();
                }
            }
//Error

loadControl ModernQueryBuilder: getState function not provided.

 

We remove the setPageSize() line of code then it not giving error but it slow down the speed of control.

 

suggest something to resolve this issue.

 

Thanks

  • Kristoffer88 Profile Picture
    87 on at
    Re: loadNextPage() function throwing error

    This seems to be fixed now

  • ybelkouchi07 Profile Picture
    33 on at
    Re: loadNextPage() function throwing error

    I'm wondering too if the problem was solved.

     

    Thanks,

    Youssef

  • Kristoffer88 Profile Picture
    87 on at
    Re: loadNextPage() function throwing error

    Any updates on this?

  • Kristoffer88 Profile Picture
    87 on at
    Re: loadNextPage() function throwing error

    Hello.

     

    This is a huge issue for us. Hope this will get fixed soon, we have production code that is not working right now, and will need to supply a quick fix for it, that will introduce more loadtime

     

    You can change the current pageSize to 250 in the on the List / Chart properties -> Formatting -> Row Layout

     

    I hope this row layout, will support up to 5k records at some time

  • Hemant Gaur Profile Picture
    on at
    Re: loadNextPage() function throwing error

    What i meant was the the page size cannot be changed and the call to make 5000 will not reflect in set loadNextPage ..

     

     

    You would need to iterate using the current page size to incrementally fetch the data in batch of 50(current page size). 

     

    hemant 

  • Community Power Platform Member Profile Picture
    on at
    Re: loadNextPage() function throwing error

    Hi Hemant,

     

    Thank you for the update.

     

    We have checked your given workaround but still get the same error, could you please share the example how to call setPageSize before the LoadNextPage. Below the code that we written:

     

    // code

    if (!this._context.parameters.sampleDataSet.loading) {
     if (this._context.parameters.sampleDataSet.paging.hasNextPage != null && this._context.parameters.sampleDataSet.paging.hasNextPage == true) {
                        //load next paging
                        this._context.parameters.sampleDataSet.paging.loadNextPage();                    
                         //set page size
                         this._context.parameters.sampleDataSet.paging.setPageSize(5000);
                    }
                }
    //Error

    loadControl ModernQueryBuilder: getState function not provided.

     

    Thanks,

  • Community Power Platform Member Profile Picture
    on at
    Re: loadNextPage() function throwing error

    Hi Hemant,

     

    Thank you for the update.

     

    We have checked your given workaround but still get the same error, could you please share the example how to call setPageSize before the LoadNextPage. Below the code that we written:

     

    // code

    if (!this._context.parameters.sampleDataSet.loading) {
     if (plotLib.isValid(this._context.parameters.sampleDataSet.paging.hasNextPage) && this._context.parameters.sampleDataSet.paging.hasNextPage == true) {
                        //load next paging
                        this._context.parameters.sampleDataSet.paging.loadNextPage();                    
                         //set page size
                         this._context.parameters.sampleDataSet.paging.setPageSize(5000);
                    }
                }
    //Error

    loadControl ModernQueryBuilder: getState function not provided.

     

    Thanks,

  • Hemant Gaur Profile Picture
    on at
    Re: loadNextPage() function throwing error

    Update - fix for this issue has been ported and is expected to be available in NAM  by  12th Dec. 

    Not changing the pagesize before the LoadNextPage call can be evalauted as a workround .

     

    hemant

     

    thanks.

    Hemant 

  • ybelkouchi07 Profile Picture
    33 on at
    Re: loadNextPage() function throwing error

     

     

  • ybelkouchi07 Profile Picture
    33 on at
    Re: loadNextPage() function throwing error

    I'm facing the same problem for a while too.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

Overall leaderboard