4 Replies Latest reply on Feb 7, 2013 2:07 PM by philmodjunk

    Summaries and Portals

    brodlang

      Title

      Summaries and Portals

      Post

           I have a report with 3 portals. The records included in the first portal are selected by the user on a previous screen.  Therefore, only the records where the "Select" field is Y (yes) appear (are filtered "Y" in the "Select" field).  One of the fields is "Qty".  I've learned from this forum, that to get the correct sum of Qty for only the records filtered, I must create a second 1-record portal using the same filter and a summary field based on Qty.  This seems to be working OK.

           The 3rd portal list items related to the first portal and one of the 3rd portals fields is also Qty.  Another is QtyExtn.  QtyExtn is a calculated field of (Portal 3:Qty * Portal 1 QtySmmry).

           I'm sure you see where this is going..  I can't figure out how to get QtyExtn to be the result of of only the doors selected (Portal2:QtySmmry) and not all the related records including those not selected.    Seems like I'm missing something simple.  Any help, as usual, is much appreciated. 

            

            

            

            

        • 1. Re: Summaries and Portals
          philmodjunk

               Using a one row filtered portal with a summary field in it works to display the total, but the total displayed is not accessible to scripts nor calculations.

               But you can define a relationship for the first portal that does not require a portal filter and that, in turn, is a relationship that you can use in your calculation.

               You'll need to substitute your names for mine, but this relationship will match to your selected records

               [Put any pairs of match fields defined for your current portal here ] AND
               LayoutTable::constY = PortalTable::Select

               Define constY as a calculation field with just "Y"--the value in your select field as its sole term.

               If you have FileMaker 12, there also are ways to get these totals using ExecuteSQL.

          • 2. Re: Summaries and Portals
            brodlang

                 Replying to my own post here.  After two weeks of struggle with this, I think the light just went on while I was re-reading my own post.  I added a "SelectedForPrint" field to my parent table with Auto Enter "Y" and made that part of the relationship with the child (portal). DUH!  Appears to be working.

                 Is this the best solution?  I can remove the filters?

            • 3. Re: Summaries and Portals
              brodlang

                   Our posts "crossed in the mail".  Thanks for the confirmation.  Should have checked in sooner.

              • 4. Re: Summaries and Portals
                philmodjunk

                     Note that if you have two users clicking "select" at the same time, all the selected portal records will appear for both users.