Hi John and Jason,

On Jun 4, 2009, at 12:28 PM, John Weinshel wrote:

Hi Chuck,

What you are describing doesn't really have anything to do with recursion. Recursion involves something using itself as an argument, whereas you just need a search with multiple criteria, in your child table, and then a way to
get back to the parents ('People') of the resulting found set.

Well, as I've been unable to come up with a technique that will show me all the People who match all the Characteristics I'm looking for, I thought I'd have to do a recursive approach to 'cull' out those that do not meet ALL the Characteristics being searched for.

Try performing a search in Characteristics for red hair, gray eyes, left handed. The resulting found set will provide a list of the FK to People,
which sounds like it's 'LinkToPeople'. You can build an explicit
relationship to People from a global list populated with those ID's, or
simply GTRR to them using ' '.

And YES, Jason has visualized the nature of the tables, fields and relationships of the project.

Thanks Jason,

I'll try your suggestions later this morning, after some eye-opening coffee. As for now, I think I'll 'sleep' on them and let the concept percolate through this lime-stone core I call a brain.

Regards,

Chuck




-----Original Message-----
From: FileMaker Pro Discussions [mailto:FMPRO- [email protected]] On
Behalf Of Chuck Pelto
Sent: Thursday, June 04, 2009 11:09 AM
To: [email protected]
Subject: Recursive Searches with FMP10

What is the best way to build a recursive search capability into an
FMP10 Script?

For example, you have two tables: People and Characteristics.

People has fields: Name, RecID.

Characteristics has fields: LinkToPeople, CharName, e.g., eye-color,
hair-color, etc., and CharValue, e.g., for eye-color, blue, green,
brown, gray.

I'm looking for a way to do a search in Characteristics that would
find all the People who are red-haired, gray-eyed and left-handed.

Or, in another search, People who are blond-haired, green-eyed and an
IQ over 120.

Can this be done?

Regards,

Chuck

Reply via email to