subform - pagination?

Questions related to using nuBuilder Forte.

subform - pagination?

Postby n9yty » Tue Oct 20, 2020 3:57 pm

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... :)
n9yty
 
Posts: 39
Joined: Fri Oct 16, 2020 4:13 am

Re: subform - pagination?

Postby kev1n » Tue Oct 20, 2020 4:35 pm

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/
Last edited by kev1n on Tue Oct 20, 2020 11:36 pm, edited 1 time in total.
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (82)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
 
Posts: 1084
Joined: Mon Oct 15, 2018 2:13 am

Re: subform - pagination?

Postby n9yty » Tue Oct 20, 2020 4:58 pm

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! :)
n9yty
 
Posts: 39
Joined: Fri Oct 16, 2020 4:13 am


Return to General