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.
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.
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.
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!