10 Replies Latest reply on Mar 6, 2012 2:51 PM by keywords

    Totals in Portals

    slraymond

      I'm a novice, attempting to build a solution similar to the home budget template; except I have created a categories table, so there is a single master list of categories, rather than a new list created every month.

       

      Here is the relationship graph:

      Screen shot 2012-02-29 at 6.35.07 PM.png

       

      I have created a tab control similar to that of the starter solution:

      Screen shot 2012-02-29 at 6.34.51 PM.png

      Note that the expense subcategories are being totaled together, not separately. What's my mistake?

        • 1. Re: Totals in Portals
          LyndsayHowarth

          It is the additional relationships, summary fields, calculations and sort orders which allow the breakdowns. You might also find the calculation function GetSummary() useful for this.

           

          Perhaps you can post your database so we can see what you've actually done..

           

          See below what appears to be missing:

           

          - Lyndsay

           

           

          homeBudget_chart.jpg

          homebudgets1.jpg

          • 2. Re: Totals in Portals
            comment

            Since you are using tabs, you will be seeing only one category at a time. Therefore, you can simplify the relationship graph by using only a single relationship filtered by a global field. However, you need a mechanism to populate the global field when switching tabs. Fake tabs acting as buttons, placed above a single portal, are an easy to set up alternative.

            • 3. Re: Totals in Portals
              comment

              Lyndsay Howarth wrote:

               

              You might also find the calculation function GetSummary() useful for this.

               

              In a portal? I don't see how.

              • 4. Re: Totals in Portals
                slraymond

                Would this work if I had a separate table occurrence for each tab?

                 

                Or alternately, a model similar to the starter solution, but with a categories TO for each category type table?

                • 5. Re: Totals in Portals
                  Stephen Huston

                  It appears that you are doing the Sum in the child records. If you calculated a Sum amount in the Parent table or from a given record as

                   

                  Sum ( PortalRelationhip::amount ) it will return the Sum of the amounts across the portal's relationship from that record's context. Place this sum at the foot of the portal (immediately below the last row) rather than in a portal row to see the sum value from the current record to the related records.

                  • 6. Re: Totals in Portals
                    comment

                    slraymond wrote:

                     

                    Would this work if I had a separate table occurrence for each tab?

                     

                    I don't see why you'd need a separate table occurrence for each tab, if you 're only going to be looking at one of them at a time. As I said earlier, I don't see why you need tabs for this either: you could look at same portal, just change the value that filters the underlying relationship (or the portal itself, if you are using version 11).

                    • 7. Re: Totals in Portals
                      LyndsayHowarth

                      No Michael, I meant that the GetSummary() could be used in the child table to breakdown the data before it gets to the portal. That way a single relationship to the child table could be used to obtain subsummary calculations which can be displayed in a portal.

                       

                      - Lyndsay

                      • 8. Re: Totals in Portals
                        LyndsayHowarth

                        Yes... this is the obvious problem with the original design too.

                         

                        - Lyndsay

                        Michael Horak wrote:

                        you could look at same portal, just change the value that filters the underlying relationship (or the portal itself

                        • 9. Re: Totals in Portals
                          comment

                          Lyndsay Howarth wrote:

                           

                          No Michael, I meant that the GetSummary() could be used in the child table to breakdown the data before it gets to the portal. That way a single relationship to the child table could be used to obtain subsummary calculations which can be displayed in a portal.

                           

                          Could you post a file showing what you mean?

                          • 10. Re: Totals in Portals
                            keywords

                            Hi there sl,

                             

                            I think you may be confusing the situation by making a connection between TOs and Tabs. Think of Tabs as just a means of arranging data on a layout. They are certainly not germane to the totals question you raised. As far as that goes, I think Stephen's suggestion of creating the total in the parent record using the Sum() function is the way to go.