Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > FileMaker: using multiple criteria in relationships

FileMaker: using multiple criteria in relationships
Thread Tools
Posting Junkie
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Online
Reply With Quote
Sep 5, 2006, 04:56 PM
 
Let's say I have a table "Households" and a table "Peasants". Each Peasant has a Household ID that relates it to its proper household.

Let's say each Peasant has a "Status" field which is either "Active" or "Deceased", and want to build the above relationship only to relate to records where (obviously) there is a Household ID match, AND a status of "Active"

At the moment I have a global field in the Households table that's contents are the text "Active" and (within the same relationship) I relate this to the Status field in the Peasants table.

Is this the way I'm supposed to do this? In other words, is there some way of putting the constant "Active" directly into the relationship criteria without wasting an entire field on it? I'm worried that by the end I'll have each table just stuffed with these global search constants.

If this is confusing, I'll try and explain it better. I'm trying to balance being clear and long-winded.

Thanks!
(Last edited by subego; Sep 5, 2006 at 06:03 PM. )
     
Senior User
Join Date: May 2000
Location: Lafayette, IN, USA
Status: Offline
Reply With Quote
Sep 6, 2006, 07:29 AM
 
Nope, that’s the way you have to do it. However, it bears mentioning that global fields are by definition unstored and user-specific, so this method will fail if either

a) …you’re in a multi-user environment, or
b) …you need a bi-directional relationship.

What I generally do, in these situations, is create a calculation field—sometimes global, sometimes not, depending on my needs—that is set to return the constant value. (As an aside, there’s a great FileMaker Naming Conventions white paper on FileMaker.com ((1.9MB PDF)), which includes some really good suggestions as to how to denote your key fields—including constants.)

HTH.
“The trouble with quotes on the Internet is that you can never tell if they’re attributed to the right person.”
—Abraham Lincoln
     
subego  (op)
Posting Junkie
Join Date: Jun 2001
Location: Chicago, Bang! Bang!
Status: Online
Reply With Quote
Sep 7, 2006, 12:14 PM
 
Absolutely it helps!

Thanks!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:21 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2