* Add Relationship to Root on Web Family Group sheet (for Web, CD or DVD)

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
BakerJL75
Famous
Posts: 200
Joined: 14 Dec 2020 11:29
Family Historian: V7

Add Relationship to Root on Web Family Group sheet (for Web, CD or DVD)

Post by BakerJL75 » 31 May 2022 21:19

In a custom version of the Web Family Group sheet (for Web, CD or DVD) Report, I would like to change the Heading/Family Member line to also show the relationship to root. It's currently %INDI.NAME[1]%. Assuming Mary Doe is the root person I'd like it to be John Doe - father of Mary Doe. I know how to do this, but I need a data reference equivalent to =Relationship(FileRoot(),,TEXT,1). Or is there a way to use a function as a data reference if that makes sense.
query.jpg
query.jpg (307.58 KiB) Viewed 756 times
Thanks,
Jackie

User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Add Relationship to Root on Web Family Group sheet (for Web, CD or DVD)

Post by rodit » 01 Jun 2022 07:57

Hello there

I have used the following Edit to the Family Member Data Reference to achieve what you are looking for:

Change %INDI.NAME%
%INDI.NAME:ADORNED_FULL% (=LifeDates2()) is =Relationship(FileRoot(),%INDI%) of =FileRoot()

Cheers
Roger

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

Re: Add Relationship to Root on Web Family Group sheet (for Web, CD or DVD)

Post by tatewise » 01 Jun 2022 09:26

Jackie, the thing you overlooked is that the Heading Text box allows Expressions and not just Data References.
Most such boxes wherever Data References are allowed also allow Functions.
The main exception is the customisation of fields in the Property Boxes, which only support a subset of Data References.

The expression proposed by Roger works well except in two cases:
  1. If the Family Member is the Root person then it says:
    Mary Doe (1900-1970) is root of Mary Doe
  2. If the Family Member is unrelated to the Root person then it says:
    Jack Smith (1900-1970) is of Mary Doe
So the relationship part needs to be conditional by using the =TextIf(...) function and testing for the values "root" and "":
%INDI.NAME:ADORNED_FULL% (=LifeDates2())=TextIf( Relationship(FileRoot())="root" or Relationship(FileRoot())="" , "" , Text( " is " . Relationship(FileRoot()) . " of " . FileRoot() ) )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Add Relationship to Root on Web Family Group sheet (for Web, CD or DVD)

Post by davidf » 01 Jun 2022 11:59

Thanks, that is a useful expression when customised for diagrams:

=TextIf((Relationship(%CUR_DGM_ROOT%,,TEXT,1) = "root") or (Relationship(%CUR_DGM_ROOT%,,TEXT,1) = ""),"",Text(%CUR_DGM_ROOT% . "'s " . Relationship(%CUR_DGM_ROOT%,,TEXT,1)))

Swapping the possessive around to avoid:
"wife's brother's wife of Joe Doe" in favour of
"Joe Doe's wife's brother's wife"
Which somehow reads more comfortably!

(May start a thread about propagating such a change through all my diagrams and text schemes across multiple projects!)
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

User avatar
BakerJL75
Famous
Posts: 200
Joined: 14 Dec 2020 11:29
Family Historian: V7

Re: Add Relationship to Root on Web Family Group sheet (for Web, CD or DVD)

Post by BakerJL75 » 01 Jun 2022 14:49

Thanks everyone. I totally missed that I could use a function there.
Thanks,
Jackie

Post Reply