Page 1 of 1

Relation for tab panel limited to 60 records

PostPosted: Thu Oct 28, 2021 12:03 pm
by steve1376656734
I have found that when I use a tab panel with a relation to show the records related to the parent form it will only load 60 records into the relation by default.

Is there any way to increase this limit?

Thanks
Steve

Re: Relation for tab panel limited to 60 records

PostPosted: Thu Oct 28, 2021 1:00 pm
by ROCLASI
Hi Steve,

What is the problem you are trying to solve?
Relationships, just like foundsets, are loading in chunks. So it loads 60 records, but will load more when you scroll down.

You can control the chunk size however. See the wiki:
https://wiki.servoy.com/display/DOCS/Tu ... vingtuning

Hope this helps

Re: Relation for tab panel limited to 60 records

PostPosted: Thu Oct 28, 2021 4:21 pm
by steve1376656734
Hi Robert,

The image shows my form layout.
forum.png
Form layout
forum.png (284.52 KiB) Viewed 1260 times

When a record is selected and displayed in the container form (table1) it automatically triggers the onRecordSelection of the tab panel form1 which uses QBSelect statements to build the visual tree representation of the related records in table2. When the user clicks on one of the nodes in the tree we have an event handler for that click in form1 that includes the line:
Code: Select all
foundset.table1_to_table2.selectRecord(pkOfTable2Record)

If there are 60 or less related records everything works fine, the on recordSelection triggers in form2 and the details of the related record are shown with no issue.
If there are more than 60 related records, when we select a node in form1 that has a primary key of a record that has not been loaded by default then nothing happens in form2.

I know that I could do
Code: Select all
foundset.table1_to_table2.loadAllRecords()
in the event handler in form1 but I wondered if there was a way of loading more than 60 records by default in a relation.