Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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.

  • Kyle12 Profile Picture
    3 on at
    Re: DataSet Paging with loadExactPage (Dynamics)

    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?

  • lemichael Profile Picture
    7 on at
    Re: DataSet Paging with loadExactPage (Dynamics)

    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 ☹️ 

  • ScottDurow Profile Picture
    1,039 on at
    Re: DataSet Paging with loadExactPage (Dynamics)

    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?

  • ScottDurow Profile Picture
    1,039 on at
    Re: DataSet Paging with loadExactPage (Dynamics)

    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
    Re: DataSet Paging with loadExactPage (Dynamics)

     

    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!

  • lemichael Profile Picture
    7 on at
    Re: DataSet Paging with loadExactPage (Dynamics)

    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.

  • AnqiChen Profile Picture
    on at
    Re: DataSet Paging with loadExactPage (Dynamics)

    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'

     

  • Sheldon Copper Profile Picture
    200 on at
    Re: DataSet Paging with loadExactPage (Dynamics)

    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.

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