dbTalk Databases Forums  

finding within two fields

comp.databases.filemaker comp.databases.filemaker


Discuss finding within two fields in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pri
 
Posts: n/a

Default finding within two fields - 07-21-2005 , 09:54 AM






hi all,
so now i have moved on to the finding layout and am having a few
issues. I am trying to make a family tree-like database with
information about each person and their height, hair color, sex, dob,
and parents info... now i made a new find layout with these fields but
would like to search for a particular trait in either parent.

for example i want to search for which parent had blue eye color, so
either the mother or the father with blue eye color shows up, without
ytping it twice. at the same time i would also be like to be able to
search on that find layout which mother had brown eyes, or maybe which
father had black eyes. i was thinking if i could do this by creating a
new relationship or maybe by duplicating the request and
constraining/expanding it. any ideas?

thanks for the help


Reply With Quote
  #2  
Old   
Peter
 
Posts: n/a

Default Re: finding within two fields - 07-21-2005 , 10:13 AM






On 21 Jul 2005 07:54:21 -0700, pri wrote :

Quote:
hi all,
so now i have moved on to the finding layout and am having a few
issues. I am trying to make a family tree-like database with
information about each person and their height, hair color, sex, dob,
and parents info... now i made a new find layout with these fields but
would like to search for a particular trait in either parent.

for example i want to search for which parent had blue eye color, so
either the mother or the father with blue eye color shows up, without
ytping it twice. at the same time i would also be like to be able to
search on that find layout which mother had brown eyes, or maybe which
father had black eyes. i was thinking if i could do this by creating a
new relationship or maybe by duplicating the request and
constraining/expanding it. any ideas?

thanks for the help
Hi,

the easiest way to do this would be to make a new field for each
characteristic you would like to search for. For example, for hair color,
you could make a new calculation field "ParentHairColor". Define it as
HairColorMum & "P" & HairColorDad. The P is the reversed P, indicating a
"return" character. It is listed under the operators in the calculation
dialog. Now, put this calculation field on your search layout and type your
query in this.

Let's say mum has brown hair and dad has red hair, the calculation field
will be :

brown
red

Searching on any two (or parts) of these will return all mums and dads with
either brown or red hair.

HTH,

Peter


Reply With Quote
  #3  
Old   
pri
 
Posts: n/a

Default Re: finding within two fields - 07-21-2005 , 10:21 AM



no no, i think i wasnt clear.

id name hair sex eyes special ::mother
::father
0 god yes yes yes everything 0
0
1 adam black male brown missing rib 0 0
2 eve blond female blue 0
0
3 cain black male brown 2
1
4 abel black male brown 2
1

now if i have a huge database not knowing if the numbers are males or
females and I perform a search for:

id name hair sex eyes special :arent

1

in this case i would like it to show me records 3 and 4. see if i had
mother as the search and tried to find 1 i would not, and then would
have to perform a second search in the father field and then find
results 3 and 4. i would like to remove that step and just have it in
once.

hope that helps. thanks again.


Reply With Quote
  #4  
Old   
pri
 
Posts: n/a

Default Re: finding within two fields - 07-21-2005 , 02:25 PM



thanks for the answer. i think concat is my best choice. now my
question is, do i have to make an entire script for all the fields. How
do i go about searching by name, sex, age, dob, atc but also by parent
whose field is a concat of mother and father?? can you give me a
semi-detailed script. thanks again.

btw.. "I don't get understand very well why you want to differ on one
hand
between father and mother, while you don't know their sex on the other
hand. "

i do know the sex of the mother and father becuase i made the
relationship that way. but sometimes when i perform a search for let's
say, number 2523 i dont know if that person is a male or female of the
top of my head. i would have to go through my results figure out the
sex before placing it in the right field (father/mother). Unless if i
had a way to search by Parent/Parent2, removing the sex part of it. So
now i can search either parent with blue eyes or black hair, instead of
searching twice for those two traits.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.