Thanks, that worked great! Is it just me or should there be an easier
way? I am not saying there is, I am saying file maker should handle this
better.
Adam
Don Wieland wrote:
On Mar 11, 2008, at 9:14 AM, Adam Gerson wrote:
I am looking to limit what results a portal displays. I have different
contact numbers phone numbers and their phone types(home, cell, work)
in a portal for a given person and I want to be able to say that the
portal should show work and home, but not cell.
I would normally do this with a SQL "where" clause. I know I can
perform a find in a script, but I want the filtered layout to be
available in IWP.
I is there any way to limit what the portal is returning in this way?
A portal shows the result of a relationship. If you want to exclude
records for your portal, there needs to be something in the relationship
that excludes the desired records.
Here is a basic example (using your specs.):
Let's say the relationship you are using is based on the Contact_ID field.
Contacts::Contact_ID EQUALS Phones::Contact_ID
You could define another field in your Contacts DB called:
Cell_Constant - (Calculation, Text Result) = "Cell"
Then you could add it as a 2nd test to you relationship like this:
Contacts::Contact_ID EQUALS Phones::Contact_ID
Contacts::Cell_Constant DOES NOT EQUAL Phones::Phone_Type
No all CELL types will be excluded.
BTW... this assumes you are using FMP7 and higher.
Hope this helps ;-)
Don Wieland
D W D a t a C o n c e p t s
~~~~~~~~~~~~~~~~~~~~~~~~~
[EMAIL PROTECTED]
Direct Line - (714) 389-4026
Integrated data solutions to fit your business needs.
--
Adam Gerson
Assistant Director of Technology
Apple Certified System Administrator (ACSA)
Columbia Grammar and Prep School
phone. 212-749-6200 ex. 321
fax. 212-428-6806
[EMAIL PROTECTED]
http://www.cgps.org
Public key - subkeys.pgp.net