cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

DataSet Paging with loadExactPage (Dynamics)

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.

7 REPLIES 7
Highlighted
Resolver I
Resolver I

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.

Highlighted
Power Apps
Power Apps

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'

 

Highlighted
Regular Visitor

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.

Highlighted
Super User
Super User

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!

Highlighted
Super User
Super User

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.

Highlighted
Super User
Super User

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?

Highlighted
Regular Visitor

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (9,991)