1 Reply Latest reply on Jul 29, 2011 9:40 AM by philmodjunk

    Resizing a Portal depending on the number of related records -- Possible?

    gczychi

      Title

      Resizing a Portal depending on the number of related records -- Possible?

      Post

      Hi,

      I have a list of all computers in a company. I have a list of all software licenses bought in that company. And I have a list of all user accounts that exist in that company. All three tables are related (in the form view of the computer table I intend to have a portal with which I can choose the appropriate software license records and another portal where I can create new records in the user accounts table).

      Now, my goal is to have a list of all computers that contains in the first row the computer data (like machine name, serial number, etc) and then below, a list of all installed software on this computer and below this list, a list of all user accounts on that computer.  Then the next computer should be listed in the same way. Both the software licenses list and the user accoutns list can have anything between 1 to 30 lines.

      But: As far as i know, portals cannot be automatically resized so that they show different numbers of lines depending on the related records. So how can I possibly accomplish this?  (I would know how to do it in MySql, but FileMaker is a litle bit trickier ;-)

      Thanks a lot for any help.

      Gary

       · 

      The list should look this way:

      «COMPUTER 1», «Serial number», «Hardware Specifics», «etc.»

           Installed Software: «OSX 10.6», «License key», «Installation Date», etc.

                                       «iWork 09», «License Key», «Installation Date», etc.

                                       «FileMaker Pro Advanced 11», «License Key», «Installation Date», etc.

           User accounts:       «Admin», «Name of User», «Privileges»

                                        «Station1», «Name of User», «Privileges»

      «COMPUTER 2», «Serial number», «Hardware Specifics», «etc.»

           Installed Software: «OSX 10.5», «License key», «Installation Date», etc.

                                       «iWork 09», «License Key», «Installation Date», etc.

                                       «FileMaker Pro 11», «License Key», «Installation Date», etc.

           User accounts:       «Admin», «Name of User», «Privileges»

                                        «Station2», «Name of User», «Privileges»

        • 1. Re: Resizing a Portal depending on the number of related records -- Possible?
          philmodjunk

          For printing/Preview/PDF purposes, you can set a portal to shrink to the number of rows in use, but you can't set it to "grow". Thus, to do this, you will likely need to create a special use layout used only for Printing/Previewing/Saving as PDF where you place your two portals, specifying a very large number of portal rows. Then you can use the inspector's Sliding and Visibility section of the Postion tab to set the portal to "slide up" , "Resize enclosing part".

          Key facts about sliding layout objects:

          1. It's only visible in preview mode and when you print/save as PDF...
          2. All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
          3. Objects in headers and footers will not slide.
          4. Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
          5. Consistent side borders are difficult to achieve with sliding fields.

          .

          The alternative, which can get messy with two or more portals, is to use a list view layout based on the portal record's table. You use a find or Go To Related Records to pull up the portal records and can add fields from the related parent record to header, footer, sub summary and grand summary layout parts as needed to pull together all the needed info with your report. The catch here is that this works for a single portal and you have two, You'd have to figure out a means to temporarily (through import records to a temp table) or permanently merge your two portal's data tables into a single table (portal filtering can still show them in separate portals on your data entry layout).

          None of these options are especially palatable, but they're the options you have to choose from to get what you need here.