Trouble when related records size is > 40

When I use tableA_to_tableB.getSize() it works fine unless the size is >40. In this case it always returns 40.

I also have a portal that displays the date of record creation. When I attach the below method to trigger on selection of a portal row it displays the master record foundset unless the foundset is >40 in which case it displays the first 40 records.
forms.examination_controller.controller.loadRecords(globals_uniqueptid_to_examination)
forms.examination_controller.controller.show()

John McCann

if you scroll down (in the portal or formpanel) then more rows aren’t queried?

I see the problem when I display in form view via a tabpanel and the controller is on the form inside the tabpanel. The getSize problem is even more concerning.

John McCann

if you really want to load everything you have to walk through all records:

something like:

relatedfoundset.setSelectedIndex(relatedfoundset.getSize());
while(relatedfoundset.getSize() != relatedfoundset.getSelectedIndex())
{
  relatedfoundset.setSelectedIndex(relatedfoundset.getSize());
}

for related foundsets the first block size (200 in normal foundset) is smaller for the first time, because there are so many relatedfoundsets in a solution.