5 Replies Latest reply on Aug 22, 2012 6:37 AM by robdownunder

    scroll a portal beyond the last row?



      scroll a portal beyond the last row?


      I have a layout that displays an entry form for an animal show.

      The entry form allows 8 animals per page and I have 10 animals.

      I've setup a portal to fill the form beautifully for the first 8 animals.

      The show says to fill out more forms for additional animals.

      It'd be great if I could scroll the portal to only show rows 9 and 10. I know I can edit the layout to start the portal at row 9, but that's not user friendly. It would be nice if the portal start/size was scriptable, but I don't think it is. Duplicating the form with different portal views is another option, but that's not slick either.

      Any ideas ?


        • 1. Re: scroll a portal beyond the last row?

          Don't print from the portal. Use the portal based layout for data entry, but use a list view layout based on the portal table for printing. If you can only list a maximum of 8 animals per form, size the body and other layout parts so that only 8 records fit on a page. Specify a page break after every 8th occurrence of the body to make sure of your page break. Animals 9 & 10 will then be printed on the second page--which becomes your second form.

          • 2. Re: scroll a portal beyond the last row?

            I shall give that a try. Thanks,

            • 3. Re: scroll a portal beyond the last row?

              Phil, is there any way to make a background image (the original form) straddle the header, body and footer of this list view.

              That's the hurdle I'm facing now. Worked on the form view behind my portal but not across these 3 parts.


              • 4. Re: scroll a portal beyond the last row?

                If you have Filemaker 11, maybe. In 12, they removed that capability. If the graphic image touches or crosses the boundary between body and header, only the portion in the header will show. Undecided

                Your other option is to stick with the 8 row portal and remove the scroll bar. To add records 9 and 10, duplicate the parent record and create the two additional records in the portal.

                • 5. Re: scroll a portal beyond the last row?

                  I went back to my original approach and found a solution that works for me.

                  I added a timestamp field to each record of the portal.  A layout script trigger sets a global variable $$hide_timestamp to the current timestamp every time the record is loaded or a "show all" button is pressed.

                  Inside the portal, each row now has a "hide" button that sets its timestamp field to $$hide_timestamp. Join results are flushed each time timestamps are altered.  A filter on the portal then displays only rows that have timestamps that are different to $$hide_timestamp.

                  End result is I can press "hide" for the first 8 portal rows and then the 9th and 10th are all that are left. I can print them separately since they float to the top of the portal automatically.

                  All buttons are hidden during printing and the portal scrollbar is stretched off the side of the page.

                  Works nicely and behaves much like omit record buttons I use in list views to trim out stuff I don't want to see/print.

                  I can rework this layout for each of the different entry forms that I come accross and keep one layout for each form.