Jump to content

Specific search script


This topic is 1577 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi every body

I have ancestor database "test file" attached

. I need a script that gives me theses search results:

If I search for a single name, I want to find the records where the last field is the "single name"
If I search for two names "Smith George", I want to find only records with the last two fields having the two names "Smith as the son and George as the father"
If I search for three names "Smith George John", I want to find only records with the last three fields having the three names "Smith as the son and George as the father and John as the grandfather"

Search parameters------------Output (result)
John-------------------------------2 results : REC3 (George, Smith, John) and REC6.
Smith George ------------------ 2 results : REC2 (George, Smith) and REC9.
Smith George John ----------- 1 result : REC9.

 

Thank you all

test file.fp7

Link to comment
Share on other sites

I think you are going about this the wrong way.  I think each generation should be in it's own table. I don't know what exactly you are ultimately accomplishing, but when you start with Gen1, will that always be Gen1.  IOW, what if research proves and older generation.  Then you would need everyone to slide down one generation.

Of course you are only following one line of genealogy.  George has a John and a Tony.  John has a Mike & Robert, Tony has a Tina, Debbie & Sheryl.

This would not be the way to set up a genealogy tree.

Link to comment
Share on other sites

Thank you for the input

I will try the multiple table option, but for now, forget about the genealogy tree.

This is just an example to show what I would like the search script to find.

Link to comment
Share on other sites

2 hours ago, Dr.Hamed said:

This is just an example to show what I would like the search script to find.

It's a good example of how complex things can get when the underlying structure is wrong.

In this example, you would have to take the three names user has entered (not clear where) and generate three separate find requests. If the user has entered two names, then you would have to generate 4 requests. If the user has entered one name only, then you would have to make 5 find requests (one for each name field).

 

On 05/23/2016 at 5:30 PM, Steve Martino said:

I think each generation should be in it's own table

No, all individuals should be in a single table, and related via a self-join, matching ParentID to IndividualID. That's the only way you can have unlimited generations.

 

Edited by comment
Link to comment
Share on other sites

1 hour ago, comment said:

No, all individuals should be in a single table, and related via a self-join, matching ParentID to IndividualID. That's the only way you can have unlimited generations.

 

@comment  I see.  But what about if you start the record with John Smith, go 5 generations down.  Then you discover you now have information on John Smith's father & grandfather.  Does the same structure still work?  Just curious.

Link to comment
Share on other sites

The genealogy tree I have is an old one containing about 60,000 names and goes back about 40 generations (starting from four ancestors). 

There are no last names "family names".  The person is known by the his name and his father name ("name" son of  "father name") so the only way to search someone is through a sequence of "his name s/o father", and some times with his grand father.

Please advice of the best way to handle the data.

The goal of the search is to find how two or more persons are related and at which generation do they the same grand grand ... father.  That why I thought a linear genealogy is easier to trace the records and to see where they meet with a common ancestor!

Thanks

Link to comment
Share on other sites

9 minutes ago, Dr.Hamed said:

The goal of the search is to find how two or more persons are related and at which generation do they the same grand grand ... father.

Does every one of the 60,000 names have a full lineage back to one of the four ancestors?

In any case, you cannot search for a person just by their name and the name of their father/grandfather - unless all such possible combinations are unique (which is not very likely).

 

Edited by comment
Link to comment
Share on other sites

 

 

45 minutes ago, comment said:

Does every one of the 60,000 names have a full lineage back to one of the four ancestors?

Yes. Every name has a full lineage.

 

45 minutes ago, comment said:

In any case, you cannot search for a person just by their name and the name of their father/grandfather - unless all such possible combinations are unique (which is not very likely).

You are absolutely right. However, the reason for searching is to find how many persons have the same combination and how they relate to each other, which is historically important.

Link to comment
Share on other sites

46 minutes ago, Dr.Hamed said:

the reason for searching is to find how many persons have the same combination and how they relate to each other,

You won't find that by searching. If you have 2 people records, you can compare their lineage and see their most recent common ancestor.

Note: this is an advanced subject (some would say highly advanced) - I would not recommend this to someone who describes themselves as a novice.

 

 

Edited by comment
Link to comment
Share on other sites

I got exactly what I need.  I created a calculation field that grabs the name from the last physically populated field by using the Case, IsEmpty and GetAsText commands, repeatedly for all fields. I created another field for "father's name" with similar scheme to grab the field prior to the last.......

Now searching these two fields gives me the entire lineage of pertinent persons, and with multiple search request I can compare lineages of different people.:)

Link to comment
Share on other sites

  • 1 year later...
  • Newbies

Hello Dr. Hamed - it looks like you put much time into this. I am just now embarking on putting a family tree together but want to do 

it in Filemaker. Would you consider sharing your template or could I trade or purchase it from you? I am a graphic designer and printer.

Best Regards,

Susan

 

Link to comment
Share on other sites

Hi Susan, and welcome to the FM Forums,

I wouldn't hold my breath waiting for Dr.Hamed to reply.

Dr. Hamed hasn't been back since 10/8/2106.

It is always better to start your own thread anyway. That way you can explain In your own words what you want to accomplish, including what you have tried, and what has or hasn't worked.

Here is an article that can help provide the kind of things that should be in included, using words. Anatomy of a Good Topic

BTW, the question of creating a Family Tree has come up in the past, so you should be able to find more on this topic by doing as search on Google.

Personally, I like Family Tree Maker for the Macintosh.

Lee

Link to comment
Share on other sites

This topic is 1577 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.