1 Reply Latest reply on Jun 23, 2010 5:17 AM by ninja

    Portals, filtering



      Portals, filtering


      FMP 10, MAC

      Is there a way of filtering records that you are going to show in a portal. I have a field that can be 'working hours' or 'after hours'. I would ideally like a portal that filters for one or the other category and only reflect those records in the portal. If there is also a method of selecting by a date range in addition to the filter, that would be perfect!


        • 1. Re: Portals, filtering

          Howdy Pam,


          in FMP10, you filter portals by manipulating the relationship between Table Occurrences.


          If you are already related by SerialID, add a field to your parent TO which is global and can be switched from "working hours" to "after hours".


          Then adjust your relationship between Parent and Child TO's to be

               Parent::SerialID = Child::SerialID

          AND  Parent::globalHourType = Child::HourType


          Now by changing the value of the Parent::globalHourType, you affect which records are related to the parent record, thus changing the records showing up in the portal...or "filtering" it.


          The same can be done with date range by having Parent::globalStartDate and Parent::globalEndDate and adding

          AND Parent::globalStartDate < Child:: Date

          AND Parent::globalEndDate > Child:: Date

            to your relationship definition.


          This is what you're looking for.  Did I guess your proficiency level well enough?