Filtering Portals - 01-13-2006 , 09:44 AM
Portals are driving me crazy. Is there a way to filter a portal by
"sales date" or "salesperson" on the fly. Or assuming I have the
talble "Sales" set up, what would be the proper relationship to set up
to show only records for a partiular sales period. Lets say the past
90 days. This is using FM 7
Re: Filtering Portals - 01-13-2006 , 11:34 AM
There are various ways of doing this depending on your needs. Let me
tackle the final part of your question. Make a new table Filter with a
global date field Date1, a global number field Days and a global Date
calculation Date2 = Date1 + Days.
In your relationship diagram relate Sales to Filter; Sales Date x
Date1 (relates all records to all records). Make a second ocurrence of
Sales call it SalesbyPeriod and relate Filter to SalesbyPeriod using
Date1 <= SalesDate (less or equal)
Date2 >= SalesDate (greater than or equal)
Put a portal into SalesbyPeriod in a layout based on the Sales TO and
drop into whatever fields you want. Also put onto the layour Date1 and
Days. As you put dates and day numbers in the portal contents will
reflect all the sales from Date1 and the next Days days.
If you want to look at Sales by Salesperson then add a global field for
Salesperson into the Filter table. Make a TO of Sales, call it
SalesbyPerson and relate it to the Filter table by matching
These methods will produce the same portal contents in every record of
Sales. If you want to vary the portal according to the record you are
in then change the x relationship into something more restrictive.
Re: Filtering Portals - 01-13-2006 , 11:48 AM
Create a global text field in the table Salesperson (or whichever one
you want to place the portal on): gYesNo, validate it with value list
YesNo = Yes No. Set it to "Yes".
Create a calc field in the table Sales:
calcNinetyDays = If(Get(CurrentDate) - SalesDate =< 90; Yes;No)
Create a relationship between gYesNo and calcNinetyDays.
Re: Filtering Portals - 01-13-2006 , 01:47 PM
I created the table "Filter" with the appropriate fields/
I related the table "Filter" to my "Sales Table" using
salestable:"sales date" x filter"date1
Then I related
filterate1< to salestable:sales date
Date2>= to salestable:sales date
I built a new layout showing records from "salestable"
I put a portal using "table26" which was the name of the occurence of
I put the two fields on you mentioned, but nothing showed up in the
what am I doing wrong?