Page 1 of 1

subform - pagination?

Posted: Tue Oct 20, 2020 8:27 am
by n9yty
Is there any way to have a subform be paginated? I tried changing the number of rows per page on the form definition, but that doesn't seem to have an impact when being used as a subform.

We have some records where there are a large number of related records (~5,000 in the test case), and not only does it make the page load take an extremely long time, the subform isn't even displaying properly once it does load with a lot of blank space at the top and when you scroll down there are random separator lines mixed in with the data.

If no way is built in, is there any way to handle it through trickery? Preferably with limited-size SQL calls to retrieve the data in chunks. :)

For speed, it probably doesn't help that I am trying to pull in some code descriptions from a different table for each row, but I don't know how to optimize it. I imagine the way it is being down now those calls are one at a time. Back again to wishing I could just write an SQL statement that feesd the subform... :) So is the answer here a browse form?

So much to learn, so much power... :)

Re: subform - pagination?

Posted: Tue Oct 20, 2020 9:05 am
by kev1n
n9yty wrote:Is there any way to have a subform be paginated? I tried changing the number of rows per page on the form definition, but that doesn't seem to have an impact when being used as a subform.
A subform doesn't support pagination.


The max. number of rows a subform can hold is 1000. But my recommendation is not exceed a few hundred rows.
If you are just going to display rows, use an embedded Browse form (Run Object) or include a 3rd party library like this: https://datatables.net/

Re: subform - pagination?

Posted: Tue Oct 20, 2020 9:28 am
by n9yty
kev1n

Thanks to your excellent help in getting me to be able to use a browse form, I replaced the subform with a BrowseEdit form and it not only is lighting fast, but provides a far better experience for what I was looking for.

Wow, you guys are awesome for sticking with my learning curve! :)