Relation for tab panel limited to 60 records

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Relation for tab panel limited to 60 records

Postby steve1376656734 » Thu Oct 28, 2021 12:03 pm

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
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: Relation for tab panel limited to 60 records

Postby ROCLASI » Thu Oct 28, 2021 1:00 pm

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
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Relation for tab panel limited to 60 records

Postby steve1376656734 » Thu Oct 28, 2021 4:21 pm

Hi Robert,

The image shows my form layout.
forum.png
Form layout
forum.png (284.52 KiB) Viewed 1139 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.
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 327
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK


Return to Programming with Servoy

Who is online

Users browsing this forum: alasdairs and 7 guests