2 Replies Latest reply on Oct 2, 2011 5:07 AM by WilliamStejskal

    Filtering multiple portals in same layout

    WilliamStejskal

      Title

      Filtering multiple portals in same layout

      Post

      I am creating an invoice for therapy services in FMP11.  My Invoices table if linked to my master ledger in such a way so that, for example, September's Invoice for patient A will only pull in service records from patient A's master ledger 1) if the service record's Month(Date of Service) matchs the Month(Invoice Date).  I want 1 portal to show sesssions (and their payments) that occurred during September, and a second portal to show records of sessions that occurred during prior months, but the insurance payment arrived in September.

      I got the two portals filtered just fine: portal one shows the current months' sessions, charges, etc., and the seocnd portal shows records  form prior months that had insurance payments come in during the current month.

      The problem is getting the Current Charges calculation field to tally only the charges for the new sessions that are are shown in portal 1.  Just like the FMP11 manual said it would, this calc field is summing all of the related records, including those in the second portal.  So, for patient A who had 3 sessions in current month @$100/sesssion, and also had insurance payments come in during the current month for 3 sessions than had occurred during a prior month (which had also been billed @$100/session), the Current Charges calculation field  - Sum (Master Ledger::Charge ) - tallys $600 instead of $300.

      Am I trying to do the impossible?

        • 1. Re: Filtering multiple portals in same layout
          Sorbsbuster

          Create a new relationship to the ledger which emulates the filter.  Leave the filter on the portal the way it is if you want, but have the Sum calculation use this new relationship.  In other words your current relationship will be something like gPatientID = PatientID, and the filter is gMonthNumber = MonthNumber in the other table.  Have a new relationship which includes both those parameters.

          • 2. Re: Filtering multiple portals in same layout
            WilliamStejskal

            Thanks, sorbsbuster.  I managed to stumble upon this fix during the late hours.  I created a new relationship between my Invoices table and a duplicate occurance of my Master Ledger Table.  I created a calculated "tag" field to distinguish line items (billable sessions) the occurred during the current month (ginvoiceID Month(DOS)&Year(DOS)&Pt#), from line items that occurred during a prior month, but were  paid during the current month (gInvoiceIDPrior = "prior"&Month(DOS)&Year(DOS)&Pt#).  Doing this , I do not even need to filter the portal.  I simply set the portal 1 up to draw related records based on gInvoiceID = InvoiceID, with portal 2 set up for gInvoiceIDPrior=InvoiceIDPrior.

            I had tried setting it up like this before, but it did not work for the relationship set up with gInvoiceIDPrior=InvoiceIDPrior.  I finally realized that I did not have Indexing truned on for this field!.  Once I fixed this, the related fields popped right in to portal 2.