1 Reply Latest reply on Jul 10, 2015 8:38 AM by philmodjunk

    how to sum selected records from related table?

    AliSheikh

      Title

      how to sum selected records from related table?

      Post

      I have a table called Floor which is linked to a table called frames via a lines table. 

      On a layout i have a portal to the floor and the frames table. With a global field i select a floor in the portal which displays related frames for that floor in the frames table. I want to be able to the total of each frame on a floor, in the frames portal.

      I'm trying to do a sum calc field in the frames table but it doesn't show the sum of how many times that frame has occured on the selected floor. It shows the total sum in all floors.

      Can anyone please advise on how to proceed.

       

      Thanks,

       

      Ali

        • 1. Re: how to sum selected records from related table?
          philmodjunk

          Sum is one of two standard methods that total related records. A summary field defined in the related table can also return the same total.

          If either of these methods fail to return the correct total, you would need to use a relationship that correctly matches to the records you want to total. You don't indicate that either of these portals are filtered, but sum ignores any portal filtering. A Summary field from the portal table, on the other hand can show a total that relfects a portal filter if you put it inside a one row portal with the exact same portal filter expression.

          Those are general comments as there are details missing that I would need to know in order to provide more detailed suggestions.

            On a layout i have a portal to the floor and the frames table.

          On what table occurrence is the layout based? How is it related to the table occurrences of the two portals?

          With a global field i select a floor in the portal which displays related frames for that floor in the frames table

          There is more than one way to do that. How exactly did you set that up? If this is global field used with a portal filter, see my comments about Sum and filtered portals at the beginning of this post.