* Expression to show a woman's Married Name

Homeless Posts from the old forum system
Locked
User avatar
johnmorrisoniom
Megastar
Posts: 782
Joined: 18 Dec 2008 07:40
Family Historian: V6.2
Location: Isle of Man

Expression to show a woman's Married Name

Post by johnmorrisoniom » 21 Aug 2012 08:56

I have partly produced a query to show burial at a particular place.
I want the first column to show the name a person was known by (Not alternate names).
So a man would always be known by his birth name, but a woman, if married, would be known by her married name.
Is there an easy way to do this?
I have read the section for help on expressions, but came away more confused than before I started.

ID:6447

User avatar
Jane
Site Admin
Posts: 7984
Joined: 01 Nov 2002 15:00
Family Historian: V6.2
Location: Somerset, England
Contact:

Expression to show a woman's Married Name

Post by Jane » 21 Aug 2012 10:34

This should work (Except where they were married more than once)

Code: Select all

=CombineText(%INDI.NAME:GIVEN_ALL%,' ',
TextIf(Exists(%INDI.FAMS%),%INDI.FAMS>HUSB>NAME:SURNAME%,%INDI.NAME:SURNAME%))
It uses a 'trick' as it uses the Family As Spouse Husband so it works with Men and Women and you don't need to detect the sex of the person.

User avatar
johnmorrisoniom
Megastar
Posts: 782
Joined: 18 Dec 2008 07:40
Family Historian: V6.2
Location: Isle of Man

Expression to show a woman's Married Name

Post by johnmorrisoniom » 21 Aug 2012 11:30

Thanks for the starter Jane.
I have tweaked it slightly as below

Code: Select all

=CombineText(%INDI.NAME:GIVEN_ALL%,' ',
TextIf(Exists(%INDI.FAMS%),%INDI.FAMS[last]>HUSB>NAME:SURNAME%,%INDI.NAME:SURNAME%),)
and with a few similar tweaks to the Husbands name column, now produces the output in the format I was hoping for.

If my Query will be of use to others, I can post it in the downloads section.

Once again, thanks for your help

Locked