* Compound queries (join Place to Individual records)

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
bjz
Silver
Posts: 9
Joined: 30 Nov 2016 00:19
Family Historian: V7
Location: Seattle, Wash.
Contact:

Compound queries (join Place to Individual records)

Post by bjz »

I'm new to FH, coming from TMG. My most frequent query for my one name study is (was)
"find me all the people in place XXX with YYY in any of their names".

(Vice versa depending on the research question.)

I'm learning to write queries and have been exploring the available features. Distancebetween seems really useful here, but I need to learn how to
- first, put the various parts of the necessary expressions in the right query fields, and
- second, connect a place within a certain distance of another place to people who had events there, and output peoples' names and dates for further use. "Any event" is OK but what I'd really like to get is certain events--BMDB, childrens' births.

Or another way of doing it. I often need to figure out which of my 35 Johann Friedrichs was a shepherd in some tiny hamlet at a particular time. If I can get to the hamlet I can find the parish records.

I don't quite have my head around the data model yet. I've read the knowledge base, documentation, help files, etc. extensively but may not have found all the right bits yet.

Help!
--Barbara
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Compound queries (join Place to Individual records)

Post by tatewise »

The Formal Database Structure might help, but has moved on somewhat in FH v7 with the addition of Research Note records and Source Template records.
FH v7 now also uses GEDCOM 5.5.1 so see GEDCOM Standard Release 5.5 and 5.5.1.

You cannot combine the features of a Place type of Query with an Individual type of Query in a 'compound' Query
However, you can probably use a Fact type of Query that bridges Places in Facts with the Individual record Owners.
See Download Type: Fact Queries for examples, especially List Baptisms and Burials for Places that illustrates filtering for particular Facts in particular Places. Adding filters for Owner Names or for say Occupation of shepherd is feasible.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
bjz
Silver
Posts: 9
Joined: 30 Nov 2016 00:19
Family Historian: V7
Location: Seattle, Wash.
Contact:

Re: Compound queries (join Place to Individual records)

Post by bjz »

I will look. I read the thread you referred me to from the email list and part of my problem is I have no idea what field to put the %FACT.PLAC>% you mentioned (column tab? row tab? in a function somewhere?). The overall thread looks very useful, I hunt for people by location all the time.

Thanks.
--Barbara
User avatar
Jane
Site Admin
Posts: 8508
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Compound queries (join Place to Individual records)

Post by Jane »

If you want to see all the people related to a specific place you can simply go to the Records List, select the Places tab and then select Edit>Record Links to see all the people at that place.

If you want to search for say a county a simply way is to select Edit>Find and enter the text you want to search for.

To search using a Query so you can filter by Surname, you will probably find it easiest to use an Individual Query and add a row filter for the Surname and then use a row filter like =ContainsText(%INDI%,"Dorset",EXT) , changing the "Dorset" for the place you want to search for.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Compound queries (join Place to Individual records)

Post by tatewise »

First, create your custom Query as explained in An Overview of Queries but ensure it is a Fact type of Query.

Checkout the FH Help Page for the Query Window https://www.family-historian.co.uk/help ... indow.html which explains the purpose of each tab.
A tip for getting a Help page for the current window is to try pressing the keyboard F1 key, which is a standard Windows feature.

The Columns tab determines how the columns of details are presented in the Result Set.

The Rows tab holds the filters that determine which subset of details you want to see.
So this is where you enter the Expression %FACT.PLAC>% along with Condition, Operator and Value.
If you download the Query attached in How to Exclude on Any Fact Place Contains (19993) you will see a similar Rows tab entry and note that I said in that posting: "its Rows tab uses: Add if %FACT.PLAC% contains ["Place or place part"]

Jane's suggestion will certainly work for some of your scenarios. Just be aware that the =ContainsText(%INDI%,"Dorset",EXT) filter will find "Dorset" or "dorset" anywhere in the Individual record not just in Place names, but also in Addresses, Notes, etc.
i.e. It is not case sensitive and it cannot restrict the search to selected Facts as you have requested.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
wildbill
Platinum
Posts: 34
Joined: 16 Nov 2021 18:16
Family Historian: V7

Re: Compound queries (join Place to Individual records)

Post by wildbill »

BJZ,

I have been exploring the same thing and support have informed me of the following which works well in an Individual Query and my Place of interest is "Cumbria" albeit hardcoded in the Query

Exclude Unless =ContainsText(%INDI%, "Cumbria", EXT)
I combine this with Exclude Unless %INDI.NAME[1]:SURNAME% Contains

This reports all those matching Surnames with mention to a particular geography even if that geographic Place is mentioned in Notes, so really anyone with a noted association to that Place.

I have the partial Surname set as parameter so I can easily change the entry each time I run the query but what I have not been able to achieve is setting the Exclude Unless =ContainsText(%INDI%, "Cumbria", EXT) as a parameter entry.

If any FH experts have an answer then please share?

Bill
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Compound queries (join Place to Individual records)

Post by tatewise »

Yes, use Exclude Unless =ContainsText(%INDI%, ["Place"], EXT) is true
i.e.
Use the same format as is used in your other Row filter which is probably like:
Exclude Unless %INDI.NAME[1]:SURNAME% Contains ["Name"]

That ["prompt"] format can be used in many scenarios but may need a Type-Specifier Functions:
e.g. =Number(["Year"])

Your suggestion is similar to Jane's but although it has the benefit of searching for the Place name everywhere, that can include false positives especially for Place names that occur as words in normal language or are part of other Place names.
e.g. Chester or Dover or York that appear in Manchester, Dorchester, Chesterfield or Andover or New York or Yorkshire.

It also does not help with filtering down to specific facts as the OP has requested.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply