cancel
Showing results for 
Search instead for 
Did you mean: 

Paging System

JustinMolina
Confirmed Champ
Confirmed Champ

Good afternoon,

 

I am trying to implement a paging system for records returned back to our system. I currently need to call DynamicFilterQuery.Execute to retrieve all the records and then page them after they are retrieved. This is inefficient however, as I need to retrieve all 17,000 of our records everytime someone needs to change pages. Ideally, we would do a skip/take on the Execute call so that we are only returning the subset of the total 17000 that we need and not all 17000 every time. Is there a way to efficiently do a skip/take when calling Execute that doesn't require me to retrieve all the records everytime?


One example is we have 20 items per page and I want to go to page 5. Right now, we retrieve all 17,000 records and run a skip/take on this using LINQ queries. What I want to do is something like: DynamicFilterQuery.Execute(20).Skip(5*20) and I retrieve the 20 items back that I need directly from OnBase without having to use LINQ to separate what I need.

1 ACCEPTED ANSWER

Rob_Herman
Star Contributor
Star Contributor

Hello,

 

There's no existing way to efficiently page through a results set. One option is to create a filter, set max results on it, and add a constraint on the value you're sorting on to pull out the next "page" of results; and do that until you get less than the maximum number of results you asked for. This sounds like it might be too much work in your case, though, since it would be hundreds of queries.

View answer in original post

3 REPLIES 3

Rob_Herman
Star Contributor
Star Contributor

Hello,

 

There's no existing way to efficiently page through a results set. One option is to create a filter, set max results on it, and add a constraint on the value you're sorting on to pull out the next "page" of results; and do that until you get less than the maximum number of results you asked for. This sounds like it might be too much work in your case, though, since it would be hundreds of queries.

Hey Rob,

 

Thanks for the reply.  Is it possible to reference a Reporting Dashboard via the API?  Use a custom SQL dashboard and call that instead?

Hi Justin,

 

Unfortunately we don't offer any Reporting Dashboard APIs  at this time. However, this is something that we are planning to release in the near future. The hope is that we can offer this option mid to late 2021. Please be sure to follow the Reporting Dashboard groups on Community to be informed when these APIs become available!

 

Thanks,

Dante D.