* Query Language

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
SpencerDudeUK
Diamond
Posts: 91
Joined: 01 Jun 2018 15:07
Family Historian: V7

Query Language

Post by SpencerDudeUK » 05 Jul 2018 10:16

I'm interested in learning more about the programming language used in Family Historian. I was a system developer when I was working, but can't recognise what the queries , etc., are written in. Where can I find out more about syntax and vocabulary (perhaps even a tutorial)?
At the moment, I can't even figure out how to modify the standard 'Search for Orphans' query to eliminate the 1's from the list - leaving me just the orphans...

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

Re: Query Language

Post by tatewise » 05 Jul 2018 10:40

FH does NOT use a Query Language (such as SQL) but uses similar Expressions as used elsewhere to customise Diagrams, Reports, Sentence Templates, Records Window Columns, Property Box Tabs, etc.

The first hurdle is that, unlike those other features, Standard Queries cannot be modified.

The general idea is that the Columns tab defines Expressions for each column in the Result Set tab.
The Rows tab defines filters involving Expressions that determine which rows appear in the Result Set tab.
With the Query Window open click the F1 keyboard function key to obtain a Help page.
See how_to:creating_a_query|> Creating a Query and checkout the further details for each tab.
Also see the book Getting the Most From Family Historian tutorial Chapter 14/18 Writing Custom Queries that is referenced in how_to:key_features_for_newcomers|> Key Features for Newcomers.

See how_to:understanding_expressions|> Understanding Expressions for more about Expressions, Data Refs & Functions in general.

BTW: The Plugins feature uses the Lua programming language. See the plugins:index#developer_guide|> Plugins > Developer Guide.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Query Language

Post by ColeValleyGirl » 05 Jul 2018 13:07

The first hurdle is that, unlike those other features, Standard Queries cannot be modified.
However, they can be saved as custom queries and those can be modified.

For what you're attempting to do with Orphans, try adding a Rows filter of:

Code: Select all

Exclude if =RelationPool() equals 1

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

Re: Query Language

Post by tatewise » 05 Jul 2018 13:44

Yes, the solution to the first hurdle is given in the F1 Help page, the [kb]|[/kb] advice, and second page of the Chapter in the book. This 'dude' was a system developer, so that help, advice & tutorials should be sufficient.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
SpencerDudeUK
Diamond
Posts: 91
Joined: 01 Jun 2018 15:07
Family Historian: V7

Re: Query Language

Post by SpencerDudeUK » 05 Jul 2018 15:09

OK. Super replies. I'll take this on board, and see what I can learn...(old dog, new tricks, etc) :lol:

Post Reply