Is there a way to set a portal to display the exact number of rows there are for the related records for the record you are viewing?
I think I know the anwer to this from looking around (that would be No) but would be very happy if I was wrong.
No, you can only specify a specific static number of portal rows.
HOWEVER, there's nothing stopping you from dropping portals all together, and starting to use the (growing in popularity) technique of loading a virtual table of related data into a webviewer for display. This method allows you to circumvent a lot of the limitations of the portal object. Just a bit more work on the backend.
Slightly different from what you are asking, but you can also change the number of visible portal rows by tying a portal top and bottom in the autosizing inspector panel. This means the length of the portal increases as the window increases.
keywords wrote: Slightly different from what you are asking, but you can also change the number of visible portal rows by tying a portal top and bottom in the autosizing inspector panel. This means the length of the portal increases as the window increases.
And to further extend this kludge, you can use an OnRecordLoad script trigger to change the window height based on the number of related records, thereby "dynamically" adjusting the number of portal rows.
Thank you for pointing me to the web viewer object. I haven't explored it because I assuemed it was only meant to deal with web based data, but I will definitely look into it. I have no problem with a little more work on the back end if it gives me more flexibility than portals have.
Here's a good video from seedcode displaying the technique in action:
Retrieving data ...