web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DataSet Paging with lo...
Power Apps
Unanswered

DataSet Paging with loadExactPage (Dynamics)

(1) ShareShare
ReportReport
Posted on by 7

Hello,

 

I'm implementing a custom DataSet control for Dynamics and I've run into an unexpected behavior while paging using the loadExactPage method (as advised in Issue using Dataset Paging).

 

The method works fine until I refresh the DataSet (using a ribbon button/dataSet.refresh method). After that, the updateView method is being invoked infinitely with loading property set to true while navigating to the third (and - in my particular case - last) page.

 

Does anybody have the same experience?

 

Thank you very much.

I have the same question (0)
  • Sheldon Copper Profile Picture
    200 on at

    Apart from the issue which you mentioned we are still facing one issue using paging i.e

     

    Suppose we have 250 records with paging size of 50.

     

    When form first page we click on next i.e. Page 2 then next page 50 record are loaded properly but when I again click on previous page button i.e from Page 2 to Page 1 then it should 50 records of page 1 but currently it is loading 100 records i.e. Page 2 + Page 1 records.

     

    Could you check from your end if you also face this issue.

     

    Look forward to your reply.

  • AnqiChen Profile Picture
    on at

    hi team,

     

    1) Once one click 'Refresh', it will goes back to first data page.

    The thing is that how does control know that it is at 'first' page.

    Then check  context.parameter.{dataset propertykey}.paging.firstpagenumber/lastpagenumber

    If they are the same, and then the control knows where it is

    We have the code change some time in March, some area might get it released, might might still wait one or two weeks. Not very long

     

    2) loadExactPage needs to be accept 'number'

     

  • lemichael Profile Picture
    7 on at

    Hello @sheldoncopper73,

    I'm sorry for belated answer. I haven't experienced that exact issue you have run into. I use the latest version of PCF and loadExactPage method (not loadPreviousPage method). A workaround I currently use is caching a loaded set of records in memory and displaying only a relevant subset. Not optimal, though.


    Hello @AnqiChen, thank you for your answer. I will give it a try.

  • ScottDurow Profile Picture
    1,039 on at

     

    In Model using loadNextPage will add records to the dataset but loadPreviousPage will not remove any - you will still have all records loaded up until that point. hasPreviousPage will always be false unless you start off at a page>1 to start with.
    In Canvas - it works differently - more like you would expect paging to work with next/previous.

    I recently blogged on this subject - https://community.dynamics.com/crm/b/develop1/posts/pcf-dataset-paging-in-model-vs-canvas-apps

     

    It outlines the differences between Canvas and Model with paging.

    Hope this helps!

  • ScottDurow Profile Picture
    1,039 on at

    BTW - are you using addColumn? I've seen similar behaviour when adding a column to the dataset, using setExactPage and in a form subgrid. 

    It seems that the control gets into an infinite loop.

  • ScottDurow Profile Picture
    1,039 on at

    Actually - I've reproduced this without using addColumn - but only on a form subgrid - it doesn't seem to happen on a home grid view - are you seeing it on a form subgrid?

  • lemichael Profile Picture
    7 on at

    Hello Scott,

    I've always used the component on a form subgrid. I honestly haven't tried it elsewhere and unfortunately threw away my minimum repro, so I can't confirm that it's a problem specific for subgrids ☹️ 

  • Kyle12 Profile Picture
    3 on at

    I'm currently having the same issue when loading the 3rd page. updateView is being called continuously in some infinite recursion of loadExactPage. The view keeps flipping between the 2nd and 3rd pages. Did you find the issue or a workaround?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard