6 Replies Latest reply on Mar 17, 2009 2:25 PM by philmodjunk

    Variable length portals

    jbreid

      Title

      Variable length portals

      Post

      I have a portal in a task list to show some related records from another table -- the products produced by the task.  The number of products varies widely between tasks so either there is too much blank space or some of the products are cut off by the bottom of the portal.  Is there a way to make the portal length variable?  I tried Format..Set Sliding/printing..'Sliding up based on all above' and 'Also reduce the size of the enclosing part' on the portal, the field inside the portal, and another plain old field just for kicks. But there was no change to either forms view or printout.

        • 1. Re: Variable length portals
          deltatango
            

          I don't think you can stretch portal rows when printing.

           

          You would have to go to a layout which uses that related table as its table and you can use go to related record script step to quickly pull related record. 

          • 2. Re: Variable length portals
            philmodjunk
              

            I would have agreed with deltatango if I hadn't read another thread on the same subject. Us olde tyme developers used to bemoan that fact that portals would not shrink correctly.

             

            I just created a test datbase with 3 records in my found set. Record 1 has portal listing 3 items. Record lists 2 items. Record 3 lists 5 items. The portal is sized to display 9 items, no scroll bar. I selected both the portal's field and the portal and set them to slide up based on all above, with reduce the enclosing part checked.

             

            I then previewed my records and they properly shrink to show just enough portal rows to display the related values.

             

             

            So, at least for FMP 10, this now works. Way to go Filemaker Inc. you just removed another pet peeve!

            • 3. Re: Variable length portals
              jbreid
                

              Hey, thank you for working that out.  That is exactly what I am doing and it STILL doesn't work.  I'm on FileMaker Pro v10.1.  Is that what you are using?

              • 4. Re: Variable length portals
                philmodjunk
                  

                I'm using FMP 10adv which should perform identically to yours.

                 

                My very first DB that I actually got paid for (and was created more years and versions ago than I care to admit) relied heavily on sliding fields to produce it's desired report. One thing that I still remember about that experience is that sliding fields are extremely sensitive to their position on the layout relative to other sliding/shrinking fields. I sometimes had to "tweak" a field's vertical postion by a single pixel in order for it to slide correctly.

                 

                I don't know if that is still true today.

                 

                I suggest the following:

                1. Make sure that adjacent fields don't overlap each other by even one pixel. I'd check the portal's position too.
                2. If your sliding is based on "all above", make sure that the bottom of a field that is "above" isn't below the top of your sliding field.
                3. You could also try creating a simple layout with just your portal on it and set it to slide/reduce. Once it works as you want, gradually add the other report elements and check to see what "breaks".
                • 5. Re: Variable length portals
                  jbreid
                     PhilModJunk you are great!  No change for forms or list view, but now it at least works for printing!  Thank you and kudos.
                  • 6. Re: Variable length portals
                    philmodjunk
                      

                    Aha! Sometimes we forget the obvious.

                     

                    Shrink and slide properties are only visible in preview mode or on the printed hard copy.

                     

                    If shrink/slide features dramatically affect the look of your report, you can use a nearly obsolete trick.

                     

                    Use a script that

                     

                    1) finds and sorts the records

                    2) selects the right layout

                    3) enters preview mode and pauses

                     

                    The user can then press enter continue the script and return to their starting point or select print from the file menu to print the report.

                     

                    This trick is nearly obsolete because FMP 10 now displays sub summary parts in browse mode and allows you to edit fields in headers. That's something that really improved several of my reports.