November 18, 201510 yr 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!
November 19, 201510 yr 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 November 19, 201510 yr by LaRetta
November 19, 201510 yr Author 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 November 19, 201510 yr by Grundly Attaching zipped and unzipped file..
November 19, 201510 yr 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.
November 19, 201510 yr 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.
November 19, 201510 yr Author 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!
November 19, 201510 yr 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 November 19, 201510 yr by comment
November 19, 201510 yr Author 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!
Create an account or sign in to comment