Page 1 of 1

Expression to show a woman's Married Name

Posted: 21 Aug 2012 08:56
by johnmorrisoniom
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

Expression to show a woman's Married Name

Posted: 21 Aug 2012 10:34
by Jane
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.

Expression to show a woman's Married Name

Posted: 21 Aug 2012 11:30
by johnmorrisoniom
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