* Counting instances of a forename amongst the descendants of an individual.

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
wulliam
Famous
Posts: 150
Joined: 03 Oct 2009 10:29
Family Historian: V7
Contact:

Counting instances of a forename amongst the descendants of an individual.

Post by wulliam »

Hi,

Naming patterns are becoming more and more important in some research I'm doing in the Scottish Highlands.

I'm needing some help in writing an expression which would judge whether a flag exists for an individual, and if it does, then count the frequency of a forename [Torquil] amongst the descendants of that person. If the flag doesn't exist then nothing is returned. For the sake of simplicity, let's say that the name will always appear in the first forename.

I have some idea of how expressions work, but no idea at all of how to count within all the generations after an individual.
Thanks!
William
User avatar
tatewise
Megastar
Posts: 28414
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Counting instances of a forename amongst the descendants of an individual.

Post by tatewise »

I don't think it is possible to write an Expression to do that kind of counting. It would need a Plugin.

However, you can probably get what you want with a custom Individual Query.
I don't know how expert you are writing Queries, so I will just summarise for now, but do ask if you need details.

The Columns tab needs very little beyond the usual Name and Record Id but other details may be useful.

It is the Rows tab where all the donkey work happens.
Use the Descendants standard Query as a starter to allow descendants of Starting Person to be listed.
That way you won't need to worry about Record Flags just choose who to start with.
Then there needs to be something like :-
Exclude unless %INDI.NAME[1]:FIRST% matches 'Torquil'
However, to be more generic, the Forename needs to be a Parameter (similar to Starting Person).

Then in the Result Set the Records in Result Set bottom right is the count you are looking for.

Further refinements could add Row filters for other than the FIRST forename, and also for Alternate Names NAME[2], etc.
You may need to juggle with the order of the filters and their use of Add/Exclude if/unless.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
wulliam
Famous
Posts: 150
Joined: 03 Oct 2009 10:29
Family Historian: V7
Contact:

Re: Counting instances of a forename amongst the descendants of an individual.

Post by wulliam »

Thanks Mike - I'll chew on that!
William
Post Reply