cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PCFDeveloper03
Frequent Visitor

loadNextPage() function throwing error

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

18 REPLIES 18
ybelkouchi07
Frequent Visitor

 

 

HemantG
Power Apps
Power Apps

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 

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,

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,

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 

Kristoffer88
Advocate I
Advocate I

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

Kristoffer88
Advocate I
Advocate I

Any updates on this?

ybelkouchi07
Frequent Visitor

I'm wondering too if the problem was solved.

 

Thanks,

Youssef

Kristoffer88
Advocate I
Advocate I

This seems to be fixed now

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (38,898)