* 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
Post Reply
avatar
LindaO
Gold
Posts: 10
Joined: 11 Apr 2010 13:11
Family Historian: V6.2

Sibling query help

Post by LindaO » 24 Aug 2019 12:16

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: 7756
Joined: 01 Nov 2002 15:00
Family Historian: V6.2
Location: Somerset, England
Contact:

Re: Sibling query help

Post by Jane » 24 Aug 2019 13:01

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: 10
Joined: 11 Apr 2010 13:11
Family Historian: V6.2

Re: Sibling query help

Post by LindaO » 24 Aug 2019 13:24

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: 16669
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Sibling query help

Post by tatewise » 24 Aug 2019 19:51

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 13 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
LindaO
Gold
Posts: 10
Joined: 11 Apr 2010 13:11
Family Historian: V6.2

Re: Sibling query help

Post by LindaO » 25 Aug 2019 09:15

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: 16669
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Sibling query help

Post by tatewise » 25 Aug 2019 09:56

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 Knowledge Base > Understanding Expressions for Queries, etc.

See Knowledge Base > FH Plugins > Developer Guide and especially Knowledge Base > 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: 7756
Joined: 01 Nov 2002 15:00
Family Historian: V6.2
Location: Somerset, England
Contact:

Re: Sibling query help

Post by Jane » 25 Aug 2019 10:31

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: 10
Joined: 11 Apr 2010 13:11
Family Historian: V6.2

Re: Sibling query help

Post by LindaO » 28 Aug 2019 11:49

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: 16669
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Sibling query help

Post by tatewise » 29 Aug 2019 11:02

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