You could stack a 7 row portal on top of a 10 row portal. Set the 7 row portal to be hidden if there are more than 7 related records. Set the 10 row portal to be hidden if there are less than 8 related records.
I'd be wary of stacking (even with hidden) if WD is to be used, but you can certainly test this.
I think rather, do some style changes such that the borders the PORTAL & PORTAL ROW are none, but the row has a box with borders. The "appearance" will be to smaller with fewer related records. Play with the borders and placement in the portal row.
Thanks a lot for your reply. What you have said is exactly what I am doing right now. I am looking for a simpler way if any.
Thanks a lot for your reply, I will try that.
Instead of just staking layout objects, you might place them on different panels of a slide control. This can make it easier to work with when modifying the design of the layout and go to object can be used to bring a specific slide control panel to the front in order to control which version is visible.
With a few portals, the better option might be to replace the portal layout with a list view layout based on the portal and with fields from the original layout's table placed in the header, footer, and/or grand summary layout parts. Your layout then naturally flexes to show any number of records from child (portal) table.
Thank you so much for your valuable notes.
Thanks a lot , you are a superstar.
I really appreciate what you've sent.
Hey folks, isn't this something you can control by anchoring the portal correctly? From: https://fmhelp.filemaker.com/help/15/fmp/en/#page/FMP_Help%2Fauto-resize-options.html
Anchoring objects on panel controls, popovers, and PORTALS
Objects located on tab controls, slide controls, popovers, or in portals adhere to the following rules:
Objects are anchored to the tab control, slide control, popover, or portal boundary rather than to the window or layout part boundary. For example, if a tab control is anchored on the right and objects inside the tab control are anchored on the left, these objects align to the tab control's left side rather than the window's left side.
If you want fields on a tab panel or slide panel to resize with the panel, you must specify resize settings for both the tab panel or slide panel and the fields located on the panel. If a panel is not set to resize, objects on the panel will not resize regardless of their individual resize settings. The same applies to popovers: If you want fields on a popover to resize with the popover, you must specify resize settings for the objects on the popover and the popover itself.
Objects located inside portals are anchored to the top and/or bottom of each row, rather than the top and/or bottom of the entire portal.
That would depend on why/when you want to resize the portal. There may be cases where you want to change the portal display even though the window size has not changed.
For avoiding stacking, it may be done using [1..7] portal and [8..10] potal. (Or, 10 portals all have 1 row)