* custom All Facts query

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
rogerdavies42
Gold
Posts: 15
Joined: 02 Apr 2017 10:47
Family Historian: V6

custom All Facts query

Post by rogerdavies42 » 16 Nov 2020 11:34

Is there any way to add a column to a custom All Facts query that lists an attribute or a flag of the fact owner? I have searched the knowledge base without success. Thanks in advance

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

Re: custom All Facts query

Post by tatewise » 16 Nov 2020 12:10

Yes, it is a bit tricky. It relies on two techniques...

1) Identify the fact owner.
Now bear in mind that some facts such as Marriage and Divorce are Family facts, so are 'owned' by the Family record.
Alternatively, they have two Individual 'owners', i.e. the Husband and the Wife who link to the Family record.
The function GetRecord(%FACT%) gets the Individual or Family record containing the fact.
The function FactOwner(%FACT%,1,MALES_FIRST) returns the Individual or Husband record.
The function FactOwner(%FACT%,2,MALES_FIRST) returns 'nothing' or the Wife record.

2) To retrieve fields from a record needs the Field(...) function, where the 1st parameter identifies the record and the 2nd parameter identifies the field.
So to determine if the Living record flag exists use:
=Field( GetRecord(%FACT%), 'INDI._FLGS.__LIVING' )
To list all record flags for each record use:
=Field( GetRecord(%FACT%), 'INDI._FLGS' )
I am not sure what you mean by attribute because Attributes are like Events and will be listed as Facts.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
rogerdavies42
Gold
Posts: 15
Joined: 02 Apr 2017 10:47
Family Historian: V6

Re: custom All Facts query

Post by rogerdavies42 » 17 Nov 2020 14:47

That is brilliant, Mike. Just what I need. Thank you very much for this and all the other help you give to members of this forum

Post Reply