cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skoofy5
Advocate IV
Advocate IV

.loadNextPage() no longer cumulative?

Has .loadNextPage() been changed so it's no longer cumulative?

Why the change?

4 REPLIES 4
cchannon
Super User
Super User

What do you mean by cumulative? I have noticed no changes in the behavior; it gives you the next page, according to your pagination value (which you can control with setPageSize), just as it always has.

DianaBirkelbach
Super User
Super User

Hi @skoofy5 , 

 

I cannot tell, since I've only used loadExactPage. That way I could have the same behaviour in both model-driven and canvas apps, but @ScottDurow has a blog about loadNextPage and these differences: https://develop1.net/public/post/2020/05/07/pcf-dataset-paging-in-mode-vs-canvas-apps

 

I'm actually happy if this changed, since this alignes both model-driven and canvas apps (+custom pages), but I can understand that this creates trouble if you are using this in production.

 

If you need the cumulative approach, maybe you can use a workaround: instead of loadNextPage you could set the pageSize to the cumulative size (so increaze the page-size each time) and call dataset.refresh().

 

Maybe @HemantG can tell us of this change is intended and should stay like this.

 

Hope this helps!

 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
skoofy5
Advocate IV
Advocate IV

Thanks for the responses. As Diana has pointed out it definitely used to be cumulative. I think when I started I used it only because I couldn't see documentation for loadExactPage (which, I believe is still not documented here - https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/paging).

 

I'm just trying to figure out how such changes come through without any warning. It didn't cause huge problems fortunately, but I'd rather know if changes to methods are coming.

DianaBirkelbach
Super User
Super User

Hi @skoofy5 , 

 

you are right, the loadExactPage is still not documented there, but there are examples in the sdk where it is used, so I wouldn't worry that much. Have a look yourself: https://docs.microsoft.com/en-us/powerapps/developer/component-framework/tutorial-create-canvas-data...

 

Hope this helps!

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (3,139)