4 Replies Latest reply on Aug 9, 2013 5:50 AM by IT_User

    Summary for Portal Filtered

    IT_User

      Title

      Summary for Portal Filtered

      Post

           So I have a database where is has companies, and on the one layout has a portal that lists a summary of their invoices.

           I want a summary field for the total amount owed on the invoices,  so I created a calculation field that summarizes this.  However, instead of using relationship filtering, I am using portal filtering.  The filtering works that it shows all unpaid invoices, but then I have a checkbox, that when clicked it shows both the unpaid and paid invoices (so basically all related invoices).

           However, since I am using portal filtering the summary calculation is summarizing all related records.

           Could I possibly create another TO and having a calculation that summarizes on tha relation? or can I just create a new field with a calculation summary without a new TO?  Or perhaps something else, like a restructuring?

           Thanks!

        • 1. Re: Summary for Portal Filtered
          philmodjunk

               Option 1: Enter layout mode and duplicate your portal. Change the number of portal rows to 1. Put a summary field defined in the portal's table to summarize your field in this one row portal. The total it displays will reflect the portal filter's limit on visible records. But this value is display only, it cannot be accessed by other calculations in fields, script steps or conditional format expressions set on other layout objects.

               Option 2: EIther modify your exsiting relationship so that the filtering takes place at the relationship level and remove your filter expression from the filter or add a new table occurrence for your summary calculation that uses a filtered relationship and reference that TO instead of the original.

          • 2. Re: Summary for Portal Filtered
            IT_User

                 Thanks!

                 Yes I think Option two of having another TO with a calculation would work easiest.  Just have to figure out the relationship, since I have to account for null values.

                 I woulnd't mind doing relationship filtering, except that I'm not sure how to set it up so that it would show all related records based on just the keys.

            • 3. Re: Summary for Portal Filtered
              philmodjunk

                   Using another TO IS relationship filtering and if that new TO works for the total it can also replace the one used with your filtered portal. You wouldn't need the original TO unless it is used for other purposes in your database.

              • 4. Re: Summary for Portal Filtered
                IT_User

                     The purpose of the original TO just based on keys (not the checkbox) is so that the the portal can show all related records, and not just the filtered ones.  The other TO would be just for the calculation summary when it is filtered.  Both the portal and the summary need to be shown on the same layout.

                     I set it up, so it seems to be working the way that I want.  When the checkbox (IsPaid) is unchecked it only shows unpaid invoices, while when it is checked it shows both unpaid and paid with the correct summary.

                      

                     Anyways, thank you!