Jump to content
Server Maintenance This Week. ×

Portal and body part resizing in List view?


Grundly

This topic is 3080 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Greetings FileMakers!

Is it possible to have a Body part as well as a Portal within that body part both resize, dynamically, based upon the number of records within that portal, within certain pre-defined bounds?

For example:

I have a table of Foods (in database speak, not in the literal sense). The Foods table has a child table called Ingredients. We show the Ingredients via a portal on the Foods layout. The Foods layout is Browsed in List View. The Body part is, say, 150 pixels tall. Within that, we stuff a little 140-pixel-tall portal showing a few rows. We could define, say, 4 rows. But that would be boring. Not all Food have 4 ingredients. Some might have just 2 ingredients, others might have 20 or 30 ingredients. What if I wanted that Foods layout's body parts and portal within to grow a bit for the "20 ingredients" and shrink a bit for the "2 ingredients" scenarios? Additionally, perhaps, grow and shrink within specific bounds, like, say, "never smaller than 2 portal rows, never bigger than 10 portal rows, scroll the portal if more than 10". Or is that asking for a pie in the sky? Specifically, I need them as portals, which is why I am asking about Portals, because some buttons are going also to live in the portal rows that do other things, which is why I am simply not doing a text concatenation of Ingredients if all I wanted was to only see a neat list of ingredients.

Thanks!

Link to comment
Share on other sites

Normally it would be best to produce the report from Ingredients (the child table).  However, you CAN have a portal adjust in size in the body.  The secret is to make the body VERY large and the portal have the maximum number of rows you would EVER need.  Then select all objects within the body and set their sliding - Inspector > Position > Arrange & Align.  Set everything to slide UP and this is key ... be sure to check 'also resize enclosing part'.

FileMaker will allow objects to reduce but not expand.

Edited by LaRetta
Link to comment
Share on other sites

Laretta thank you

Could I trouble you for a tiny demo file? I am unable to get that to work, I get no action at all. I've double and triple checked but I must be missing something still...

Food.fmp12

Food.fmp12.zip

Edited by Grundly
Attaching zipped and unzipped file..
Link to comment
Share on other sites

23 hours ago, Grundly said:

Is it possible to have a Body part as well as a Portal within that body part both resize

Parts and objects in them will resize only when the layout is printed, or viewed in Preview mode. Judging by what you said about needing buttons in the portal rows, that's not the case here - so the answer is no, it is not possible.

Link to comment
Share on other sites

Uh, I forgot to mention that one must be in preview mode.  And it adjusts properly when printing.  I just re-read and I see you have buttons in the portal rows as well so it means you want browse mode.  That will not happen.

<blush>  sorry for my error.

Link to comment
Share on other sites

Ah! That must be it then, thank you! Browse mode is in fact needed. I wonder if anyone has sent that to FileMaker INC as a feature request yet. Seems to me like.. when specifying Portal details, instead of only accepting an integer for the number of rows, allow us to enter a formula as well if we want to. And 'somehow' make Body aware of that option too. Probably opening up a nasty can of worms by doing that maybe. Thanks for taking the time to look into it!

Link to comment
Share on other sites

21 minutes ago, Grundly said:

I wonder if anyone has sent that to FileMaker INC as a feature request yet.

I believe FMI marked this as 'done' when they enabled viewing sub-summary parts in Browse mode. If you switch your layout to the Ingredients table and view it in List mode, with Foods being shown in a sub-summary part, you will get all the features you have described - with the exception of a scroll bar when the number of ingredients exceeds a limit.

Edited by comment
Link to comment
Share on other sites

Comment, sounds like a good solution. I'll have to make sure the revised layout stays 'sorted' no-matter-what, but otherwise, close enough. Thanks again. Should serve the need quite well!

Link to comment
Share on other sites

This topic is 3080 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.