* Expression in diagrams

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
Gowermick
Megastar
Posts: 1629
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Expression in diagrams

Post by Gowermick » 05 Dec 2022 10:58

From the KB, I know that the expression =IsAncestorOf( %INDI%, Field( FileRoot(), 'INDI.~FATH>' ) ) returns all paternal ancestors

Q1. I can see how Field( FileRoot(), 'INDI.~FATH' refers to the Root's father, but not why it ends with >, when there is no matching <

Q2. How can this expression be altered to refer to the Root's father's Father?

If I can't use INDI,~FATH,~FATH, how can I refer to their Record ID's? e.g. IsAncestor of Record (2345)

My aim is to colour code the diagram according to which of the individuals grandparents their line originates from.
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

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

Re: Expression in diagrams

Post by tatewise » 05 Dec 2022 11:17

Gowermick wrote:
05 Dec 2022 10:58
Q1. I can see how Field( FileRoot(), 'INDI.~FATH>' ) refers to the Root's father, but not why it ends with >, when there is no matching <
In data references the > is a pointer from one record to another and has nothing to do with conditional < angle brackets >
Checkout Understanding Data References and associated FH Help pages.
The 'INDI.~FATH' shortcut refers to the Family record HUSB field and is equivalent to 'INDI.FAMC>HUSB' and that field holds the link to the Individual record for the father.
Q2. How can this expression be altered to refer to the Root's father's Father?
Just keep adding data reference shortcuts: 'INDI.~FATH>~FATH>' and 'INDI.~FATH>~MOTH>' etc.
Last edited by tatewise on 05 Dec 2022 12:09, edited 1 time in total.
Reason: Corrected FATH field to say HUSB field
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gowermick
Megastar
Posts: 1629
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Expression in diagrams

Post by Gowermick » 05 Dec 2022 11:37

Mike,
the only place where > is shown, is when it described as a "link indicator", and forms part of a chain, where > is indicating the next link in the chain, like %INDI.FAMC>HUSB>NAME[2]% which makes perfect sense.

But that doesn't explain why > is at the end of the expression, when there is nothing further to point to!

Can I assume from your second sentence, that I can further extend the chain 'INDI.FAMC>FATH' to include his grandfather, by using INDI.FAMC>FATH.FAMC>FATH'

NB You say INDI.FAMC>FATH is equivalent to INDI.~FATH, but that does not work in the expression!
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

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

Re: Expression in diagrams

Post by tatewise » 05 Dec 2022 12:25

Gowermick wrote:
05 Dec 2022 11:37
the only place where > is shown, is when it described as a "link indicator", and forms part of a chain, where > is indicating the next link in the chain, like %INDI.FAMC>HUSB>NAME[2]% which makes perfect sense.

But that doesn't explain why > is at the end of the expression, when there is nothing further to point to!
Please, review both the FHUG KB and FH Help pages that give many examples of > at the end of a data reference.
e.g. INDI.FAMC> points to a Family record. By contrast, INDI.FAMC refers to the FAMC field in the Individual record.
Consider this: %INDI.NAME% refers to an Individual record Name, so what does %INDI% refer to?
%INDI.FAMC>HUSB>NAME% refers to an Individual record Name, so what does %INDI.FAMC>HUSB>% refer to?
In both cases, I've simply removed the reference to the local NAME field.
%INDI.FAMC>HUSB% without the > refers to the HUSB field in the Family record.
Can I assume from your second sentence, that I can further extend the chain 'INDI.FAMC>FATH' to include his grandfather, by using INDI.FAMC>FATH.FAMC>FATH'

NB You say INDI.FAMC>FATH is equivalent to INDI.~FATH, but that does not work in the expression!
Sorry, my typo. :oops: It is now corrected and says:
The 'INDI.~FATH' shortcut refers to the Family record HUSB field and is equivalent to 'INDI.FAMC>HUSB' and that field holds the link to the Individual record for the father.
So to obtain the father's Individual record a link indicator > is required:
e.g. 'INDI.~FATH>' or 'INDI.FAMC>HUSB>' i.e. Individual record linked to Family record linked to Individual record is two links so two > are needed.

Further generations can use such as:
'INDI.~FATH>~FATH>' shortcuts or 'INDI.FAMC>HUSB>FAMC>HUSB>' longhand.
'INDI.~MOTH>~MOTH>' shortcuts or 'INDI.FAMC>WIFE>FAMC>WIFE>' longhand.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gowermick
Megastar
Posts: 1629
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Expression in diagrams

Post by Gowermick » 05 Dec 2022 13:04

Thanks for that, I’ll give it a try when I’m next on my PC.

Without belabouring the point, nowhere in the help or KB explicitly explains the use of the trailing >.
They both show examples of it in use, but that in itself, does not explain why it is there or needed!
It makes it easier to remember something if it is understood :D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

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

Re: Expression in diagrams

Post by tatewise » 05 Dec 2022 13:24

I thought the explanation of %INDI.FAMC>HUSB>NAME% made it fairly clear.
Just omit each trailing field in turn and interpret the description given.
What do you think is the difference between %INDI.FAMC% and %INDI.FAMC>%?
That is explained in:
INDI Start with an INDIvidual Record
FAMC Within this Record, follow the > link to the FAMily they belong to as a Child

Consider:
%INDI% refers to an INDI record.
%INDI.NAME% refers to the NAME field within the INDI record. The NAME field contains the text of the name.
%INDI.FAMC% refers to the FAMC field within the INDI record. The FAMC field contains a link to the FAM record.
%INDI.FAMC>% refers to the FAM record, i.e. follows the FAMC link pointer.
%INDI.FAMC>HUSB% refers to the HUSB field within the FAM record. The HUSB field contains a link to an INDI record.
%INDI.FAMC>HUSB>% refers to that INDI record, i.e. follows the HUSB link pointer.
%INDI.FAMC>WIFE>% refers to a different INDI record for the wife.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gowermick
Megastar
Posts: 1629
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Expression in diagrams

Post by Gowermick » 05 Dec 2022 14:57

tatewise wrote:
05 Dec 2022 13:24
I thought the explanation of %INDI.FAMC>HUSB>NAME% made it fairly clear.
Just omit each trailing field in turn and interpret the description given.
What do you think is the difference between %INDI.FAMC% and %INDI.FAMC>%?
That is explained in:
INDI Start with an INDIvidual Record
FAMC Within this Record, follow the > link to the FAMily they belong to as a Child
Mike,
It took me six reads of the explanation in the KB for the above expression %INDI.FAMC>HUSB>NAME% , before the penny dropped!
I think it could be made clearer if more emphasis were given as to the purpose of >

I and I suspect others will assume the > between INDI.FAMC and HUSB. is linking the FAMC to HUSB which is our mistake

I think the KB may read better if the four lines explaining the expression were written slightly differently, perhaps as follows:

INDI Start with the Individual Record
FAMC> The link to the Family the Individual belongs to as a child (Making it clear the > belongs to FAMC)
HUSB> The link to the Husband of the family Record
NAME The name of the Husband within the family Record
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

Post Reply