* Sibling query help

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
avatar
LindaO
Gold
Posts: 15
Joined: 11 Apr 2010 13:11
Family Historian: V7

Sibling query help

Post by LindaO »

I have been trying, without success, to produce a query to output the siblings for every RecordId in FH. I have experimented with outputting data in linear format, viz RecordId, Sibling1, Sibling2.... etc which produces 1 row per RecordId and also stacked format, viz RecordId, SiblingName, Relationship - "brother", "sister", etc. with multiple records for each RecordId. Both formats have issues.

The linear format with 1 row per RecordId using a "Family As Child" expressions shows the RecordId as a sibling of itself (for example, I am listed as Sibling2 of my own RecordId). I can also output halfsiblings in this format through adding parents to the output and entering expressions within the Row tab of the query.

The stacked format uses the =Relationship() expression but can only output one person at a time however it can be filtered to only output "brother", "sister", "halfbrother", ... etc . This is not a feasible option however given the numbers of persons in my tree.

I can utilise the output from the linear formatted query and manipulate the data outside FH to eliminate the RecordId being listed as a sibling, however I would prefer to produce the output in FH to cut down on the possibility of data errors. Any help/ideas would be greatly appreciated.

Thanks,

Linda.
User avatar
Jane
Site Admin
Posts: 8507
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Sibling query help

Post by Jane »

I suspect this is one of those jobs which is much easier with a plugin. Have your experimented with plug in writing yet?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
avatar
LindaO
Gold
Posts: 15
Joined: 11 Apr 2010 13:11
Family Historian: V7

Re: Sibling query help

Post by LindaO »

Jane,

Thanks for your reply. Not had a go at plugins yet but maybe this is my opportunity! If there is no solution with a query will probably, at least in the short term, output a text file and manipulate it outside FH with code. I know my data quite well so know what RecordId's to check to see if my code is working as I hoped. Then, at some point in the future, have a go at a plugin - I keep promising myself I will have a go at one and at least I would have something I need/would use to work on.

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

Re: Sibling query help

Post by tatewise »

Depending on exactly what you want, the attached Query lists all the siblings of each Individual might do.

It is similar to your linear list but with some refinements.

It excludes Individuals with no siblings, and blanks out sibling cells that contain the Individual themself.
Sorting by Surname and Rec Id is provided for each column.

Currently it only looks at first Family as Child and only first 4 siblings, but could easily be extended.
Attachments
Siblings.fhq
(3.74 KiB) Downloaded 141 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
LindaO
Gold
Posts: 15
Joined: 11 Apr 2010 13:11
Family Historian: V7

Re: Sibling query help

Post by LindaO »

Hello Mike,

Thanks for the sibling query which I will extend to cover my data needs. It does the hard work of identifying the sibling who is also the "record owner" and will make it easier when using the data outside FH.

Looking at the expressions you have developed it gives me many more ideas for building my own. The expression builder is far more sophisticated than I realised or have used in FH. It is more comparable to other software expressions builder than I have previously appreciated. Assuming that the expression builder is built on Lua, presumably the functions, operators, etc available to a Lua query will also work in FH queries. Will have to get myself a book on Lua and start building myself more complex queries!

Thank and regards,

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

Re: Sibling query help

Post by tatewise »

Unfortunately, the FH Expressions used in Queries, Diagram Text Schemes, Reports, etc, etc, were designed in the earlier FH versions way before Lua Plugins were introduced, so they are NOT compatible.

See how_to:understanding_expressions|> Understanding Expressions for Queries, etc.

See plugins:index#developer_guide|> FH Plugins > Developer Guide and especially plugins:getting_started|> Getting Started Writing Plugins that has many online references so you don't need to buy a book.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Jane
Site Admin
Posts: 8507
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Sibling query help

Post by Jane »

Just to clarify a little in plugins you can call any single function from queries or grab any single data reference.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
avatar
LindaO
Gold
Posts: 15
Joined: 11 Apr 2010 13:11
Family Historian: V7

Re: Sibling query help

Post by LindaO »

Sorry for delay in thanking you both but been working at turning out more sophisticated custom queries now I have an idea of what FH queries can and can't do. Still thinking about a plug in but won't be over next month or so.

Thanks and regards,

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

Re: Sibling query help

Post by tatewise »

I'm glad that worked OK.

Just one thing. I have notice your FH version is not identified in your profile to right of your postings.
So click your username LondaO top right and choose User Control Panel. Then on its Profile tab, select your Family Historian Version and scroll down to Submit.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply