* Diagrams: Multiple Spouses

Homeless Posts from the old forum system
Locked
User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Diagrams: Multiple Spouses

Post by davidf » 12 Jun 2011 15:04

I am trying to amend a template so as to list in all boxes (ancestor and descendent tress etc.) all marriages for everyone who 'has a box' and their age on marriage.

So if a (M) relative married someone who had been married before, his box would show:

Married: dd MMM yyyy Age: yy to Wife - place

and her box would show:

Married: (Divorced) dd MMM yyyy Age: yy to Husband - place
Married: dd MMM yyyy Age: yy to Relative - place

I think I am almost there with:

Married: =ExistsText(%INDI.FAMS[1+]>_STAT%,'(')%INDI.FAMS[1+]>_STAT%=ExistsText(%INDI.FAMS[1+]>_STAT%,') ')%INDI.FAMS[1+]>MARR.DATE% =ExistsText(%INDI.FAMS[1+]>MARR.DATE%,'Age:') =AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%) to %INDI.~SPOU[1+]>% - %INDI.FAMS[1+]>MARR[1+].PLAC:TIDY%

(All box types = 'any')

I can inhibit the 'Age:' text if I do not know the date of marriage - but I would also like to inhibit it if the birthdate of the individual is not known.

I would also like to replace the 'Married: ' with something more appropriate for 'Unmarried couple' and for couples that were engaged but did not marry ('Never married').  Married: (Never married) looks a bit stupid!

I am trying something similar with the 'Engagement' Family event - but am running into problems.  I hope checking and correcting the above will give me a few clues.

Thanks
David


ID:5138

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

Diagrams: Multiple Spouses

Post by tatewise » 12 Jun 2011 17:39

This should do a lot of what you request:

Married: =ExistsText(%INDI.FAMS[1+]>_STAT%,'(' . %INDI.FAMS[1+]>_STAT% . ') ')%INDI.FAMS[1+]>MARR.DATE% =TextIf(Exists(%INDI.FAMS[1+]>MARR.DATE%) and Exists(%INDI.BIRT%),'Age: ' . AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%),) to %INDI.~SPOU[1+]>% - %INDI.FAMS[1+]>MARR[1+].PLAC:TIDY%

Notice how to combine the '(' . {Status} . ') ' into a single =ExistsText() function.

Notice how to test two conditions using =TextIf() function with and.

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

Diagrams: Multiple Spouses

Post by tatewise » 12 Jun 2011 18:53

Sorry, the earlier post had some errors and did not really solve all your requests.
This I think gets a lot closer:

=TextIf(IsEmpty(%INDI.FAMS[1+]>_STAT%),ExistsText(%INDI.FAMS[1+]>MARR%,'Married'),%INDI.FAMS[1+]>_STAT%) %INDI.~SPOU[1+]>% %INDI.FAMS[1+]>MARR.DATE%=TextIf(Not(NullDate(%INDI.FAMS[1+]>MARR.DATE%)) and Not(NullDate(%INDI.BIRT.DATE%)),' Age: ' . AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%),) - %INDI.FAMS[1+]>MARR[1+].PLAC:TIDY%

It produces text such as:

Married Jane Smith 11 May 1940 Age: 25 - Guildford
Married Jim Scott Q1 1920 - London
Divorced Jill James 2 June 1839 Age: 31
Never Married George Jones
Unmarried Couple Joe Bloggs

Analysis:

This produces the Married/Divorced/Never Married/Unmarried Couple status:
=TextIf(IsEmpty(%INDI.FAMS[1+]>_STAT%),ExistsText(%INDI.FAMS[1+]>MARR%,'Married'),%INDI.FAMS[1+]>_STAT%)

This is the Spouse name:
%INDI.~SPOU[1+]>%

This is the marriage Date:
%INDI.FAMS[1+]>MARR.DATE%

This is the Age: part:
=TextIf(Not(NullDate(%INDI.FAMS[1+]>MARR.DATE%)) and Not(NullDate(%INDI.BIRT.DATE%)),' Age: ' . AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%),)

This is the Place part:
- %INDI.FAMS[1+]>MARR[1+].PLAC:TIDY%

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

Diagrams: Multiple Spouses

Post by davidf » 12 Jun 2011 22:43

Thanks, that takes me a long way - however:
Divorced Jill James 2 June 1839 Age: 31
looks like the date of divorce and not of marriage (which I might not necessarily know), so
Married (Divorced) Jill James 2 June 1839 Age: 31
is actually better!

Can you test the status for a specific value?

David

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

Diagrams: Multiple Spouses

Post by davidf » 12 Jun 2011 22:55

Also if I only know that they were married (but no date, place), it does not quite work:

(image removed)

David

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

Diagrams: Multiple Spouses

Post by tatewise » 13 Jun 2011 00:28

Here is the solution to the Divorced status case, which tests for %INDI.FAMS[1+]>_STAT% = 'Divorced' and substitutes 'Married (Divorced)'.
The other problem is where there is a Spouse family but no Marriage event, and this is fixed by changing ExistsText(%INDI.FAMS[1+]>MARR%,'Married') to ExistsText(%INDI.~SPOU[1+]>%,'Married').

This is just the status section of the earlier template preceding the spouse name:

=TextIf(IsEmpty(%INDI.FAMS[1+]>_STAT%),ExistsText(%INDI.~SPOU[1+]>%,'Married'),TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced','Married (Divorced)',%INDI.FAMS[1+]>_STAT%)) ~

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

Diagrams: Multiple Spouses

Post by tatewise » 13 Jun 2011 13:56

Here are some more suggestions you might like to consider:
1) When there is no marriage Status, it displays Married only if there is a Marriage event, otherwise if there is only a Spouse family it displays Spouse.
2) Instead of Married (Divorced) it displays Married and adds (now Divorced) right at the end of the line.

Analysis:

Display of marriage status as before but ExistsText(%INDI.~SPOU[1+]>%,'Married') is replaced by TextIf(IsEmpty(%INDI.FAMS[1+]>MARR%),ExistsText(%INDI.~SPOU[1+]>%,'Spouse'),'Married'):
=TextIf(IsEmpty(%INDI.FAMS[1+]>_STAT%),TextIf(IsEmpty(%INDI.FAMS[1+]>MARR%),ExistsText(%INDI.~SPOU[1+]>%,'Spouse'),'Married'),TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced','Married',%INDI.FAMS[1+]>_STAT%)) ~

Name of spouse as before:
%INDI.~SPOU[1+]>%

Date of marriage as before:
%INDI.FAMS[1+]>MARR.DATE%

Age at marriage as before:
=TextIf(Not(NullDate(%INDI.FAMS[1+]>MARR.DATE%)) and Not(NullDate(%INDI.BIRT.DATE%)),' Age: ' . AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%),) -

Place of marriage s before:
%INDI.FAMS[1+]>MARR[1+].PLAC:TIDY%

Extra optional (now Divorced) status text:
=TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced',' (now Divorced)',)

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

Diagrams: Multiple Spouses

Post by davidf » 13 Jun 2011 14:36

Thanks, definitely getting there!

Slight modification gives:
=TextIf(IsEmpty(%INDI.FAMS[1+]>_STAT%),ExistsText(%INDI.~SPOU[1+]>%,'Married'),TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced','Married (Subs. Divorced)',%INDI.FAMS[1+]>_STAT%)):  %INDI.~SPOU[1+]>%, %INDI.FAMS[1+]>MARR.DATE%=TextIf(Not(NullDate(%INDI.FAMS[1+]>MARR.DATE%)) and Not(NullDate(%INDI.BIRT.DATE%)),' Age: ' . AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%),) - %INDI.FAMS[1+]>MARR[1+].PLAC:TIDY%

(I would like to be able to amend further to be able to indicate:
Married (Subs. Widowed),
Married (Subs. Widowered)
but I think that is pushing templates a bit too far!)

So, I think marriages are now sorted, so on to Engagements (given that I do not always have engagement details). Currently I have:

=TextIf(Exists(%FAM[1+].ENGA%),'Engaged to: ' . %FAM[1+].~SPOU>% . ', ' . %FAM[1+].ENGA.DATE% . ' in ' . %FAM[1+].ENGA.PLAC:TIDY%,'')

(all box types set to any)

This is giving me:
Image
Which is almost as I want it but the engagement to Belinda is not showing in Arthur's box.

Any thoughts? Thanks
David

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

Diagrams: Multiple Spouses

Post by davidf » 13 Jun 2011 14:59

Got out of sync on this one!

Trying to build your suggestion from the posting of 13:56, I get

=TextIf(IsEmpty(%INDI.FAMS[1+]>_STAT%),TextIf(IsEmpty(%INDI.FAMS[1+]>MARR%),ExistsText(%INDI.~SPOU[1+]>%,'Spouse'),'Married'),TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced','Married',%INDI.FAMS[1+]>_STAT%)) ~ %INDI.~SPOU[1+]>% %INDI.FAMS[1+]>MARR.DATE%=TextIf(Not(NullDate(%INDI.FAMS[1+]>MARR.DATE%)) and Not(NullDate(%INDI.BIRT.DATE%)),' Age: ' . AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%),) - %INDI.FAMS[1+]>MARR[1+].PLAC:TIDY% =TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced',' (now Divorced)',)

Which seems to work well (and looks more logical) - thanks

David

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

Diagrams: Multiple Spouses

Post by tatewise » 13 Jun 2011 22:31

This template should work OK:

=ExistsText(%INDI.FAMS[1+]>ENGA%,'Engaged to: ' . %INDI.~SPOU[1+]>%), %INDI.FAMS[1+]>ENGA.DATE% in %INDI.FAMS[1+]>ENGA.PLAC:TIDY%

Also in the Edit Text Scheme Item window ensure that every Box Types and Conditions option says any in the same way as in your Marriage scheme, to ensure all spouses of either sex are enabled.

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

Diagrams: Multiple Spouses

Post by davidf » 14 Jun 2011 09:25

Thanks again. I can't see why that should not work, but it doesn't!

Image

Note that Arthur's (youthful and unfulfilled) engagement to Belinda shows in both their boxes (so far so good), but Arthur's later engagement to Elly only shows in Elly's box (which points to an inconsistency - possibly in the [1+] bits?).

(All boxes are changed to 'any')

The GEDCOM is below - not that I can see a problem there as this must(?) be an issue of functionality in the Diagrams area of FH.

Thanks
David

0 HEAD
1 SOUR FAMILY_HISTORIAN
2 VERS 4.0
2 NAME Family Historian
2 CORP Calico Pie Limited
1 FILE C:UsersdavidDocumentsPersonalGenealogyFamilyTreesTest - multi spouse.GED
1 GEDC
2 VERS 5.5
2 FORM LINEAGE-LINKED
1 CHAR ANSI
1 _UID {6F3E229B-1CDF-47db-B446-7DAAB0F7E4AD}
1 _LIST Key Individuals
1 _LIST Work in Progress
1 _LIST Bookmarks
0 @I1@ INDI
1 NAME Arthur //
1 SEX M
1 BIRT
2 DATE 1 JAN 1930
1 FAMS @F4@
1 FAMS @F1@
1 FAMS @F3@
1 CHAN
2 DATE 13 JUN 2011
3 TIME 13:58:22
0 @I2@ INDI
1 NAME Carole //
1 SEX F
1 BIRT
2 DATE 1 FEB 1935
1 FAMS @F1@
1 FAMS @F2@
1 CHAN
2 DATE 13 JUN 2011
3 TIME 13:58:08
0 @I3@ INDI
1 NAME Danny //
1 SEX M
1 FAMS @F2@
1 CHAN
2 DATE 13 JUN 2011
3 TIME 13:57:42
0 @I4@ INDI
1 NAME Elly //
1 SEX F
1 FAMS @F3@
1 CHAN
2 DATE 13 JUN 2011
3 TIME 13:57:29
0 @I5@ INDI
1 NAME Belinda //
1 SEX F
1 FAMS @F4@
1 CHAN
2 DATE 13 JUN 2011
3 TIME 13:58:21
0 @F1@ FAM
1 MARR
2 DATE 1 MAR 1955
1 HUSB @I1@
1 WIFE @I2@
1 _STAT Divorced
1 CHAN
2 DATE 13 JUN 2011
3 TIME 12:20:00
0 @F2@ FAM
1 HUSB @I3@
1 WIFE @I2@
1 CHAN
2 DATE 13 JUN 2011
3 TIME 12:18:06
0 @F3@ FAM
1 ENGA
2 DATE 1 APR 1960
1 HUSB @I1@
1 WIFE @I4@
1 CHAN
2 DATE 13 JUN 2011
3 TIME 19:31:01
0 @F4@ FAM
1 ENGA
2 DATE 14 FEB 1947
1 HUSB @I1@
1 WIFE @I5@
1 _STAT Never Married
1 CHAN
2 DATE 13 JUN 2011
3 TIME 14:22:03
0 TRLR

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

Diagrams: Multiple Spouses

Post by tatewise » 14 Jun 2011 11:39

It is a consequence of using the [1+] looping index, which only works for consecutive instances.
For Arthur the 2nd Spouse family (Carole) has no Engagement event therefore the consecutive sequence stops.
If you add an Engagement for Arthur and Carole you will see all his three Engagement events.
If you then delete the Engagement for Arthur and Belinda, none of his Engagement events appear, because the consecutive sequence does not start at 1 but at 2.
If you change the Engagement Template to use [2+] then his Engagement events should appear, but all the ladies' will vanish.

Also note how all the Engagement events are listed together, followed by all the Marriage events, which is probably not what you want.
If you chose to add Divorce events then these would all be listed together too.

The solution is to forget about [1+] looping indexes.
Create an Engagement 1 and a Marriage 1 template with [1+] replaced by [1].
Create an Engagement 2 and a Marriage 2 template with [1+] replaced by [2].
Repeat for as many Spouse families you want cater for.
Place the templates in the order Engagement 1,Marriage 1, Engagement 2, Marriage 2, et seq, and all should work OK.

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

Diagrams: Multiple Spouses

Post by davidf » 14 Jun 2011 14:42

Thanks again.

I think I take Engagement out of the text scheme and further amend the Marriage template to read:

=TextIf(IsEmpty(%INDI.FAMS[1+]>_STAT%),TextIf(IsEmpty(%INDI.FAMS[1+]>MARR%),ExistsText(%INDI.~SPOU[1+]>%,'Spouse'),'Married'),TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced','Married ',%INDI.FAMS[1+]>_STAT%)) to %INDI.~SPOU[1+]>% %INDI.FAMS[1+]>MARR.DATE%=TextIf(Not(NullDate(%INDI.FAMS[1+]>MARR.DATE%)) and Not(NullDate(%INDI.BIRT.DATE%)),' Age: ' . AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%),) - %INDI.FAMS[1+]>MARR[1+].PLAC:TIDY% =TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced',' (now Divorced)',) =TextIf(Exists(%INDI.FAMS[1+]>ENGA.DATE%),'Engaged: ','') %INDI.FAMS[1+]>ENGA.DATE%

Image

I think that is behaving itself - at least for my current test data - it also gets the relationships in the right order.

David

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

Diagrams: Multiple Spouses

Post by tatewise » 14 Jun 2011 16:10

That looks very good.
May I suggest you swap the order of the Divorce and Engagement sections, so that if the couple were both engaged and divorced, the events are in correct order.
Also you could add the Divorce Date if a Divorce event exists.
Also generate the ' ~ Divorced' text if a Divorce Date exists as well as the Divorced status.
e.g.
=TextIf(IsEmpty(%INDI.FAMS[1+]>_STAT%),TextIf(IsEmpty(%INDI.FAMS[1+]>MARR%),ExistsText(%INDI.~SPOU[1+]>%,'Spouse'),'Married'),TextIf(%INDI.FAMS[1+]>_STAT% = 'Divorced','Married',%INDI.FAMS[1+]>_STAT%)) to %INDI.~SPOU[1+]>% %INDI.FAMS[1+]>MARR.DATE%=TextIf(Not(NullDate(%INDI.FAMS[1+]>MARR.DATE%)) and Not(NullDate(%INDI.BIRT.DATE%)),' Age: ' . AgeAt(%INDI%,%INDI.FAMS[1+]>MARR.DATE%),) - %INDI.FAMS[1+]>MARR[1+].PLAC:TIDY%=TextIf(Exists(%INDI.FAMS[1+]>ENGA.DATE%),' ~ Engaged',) %INDI.FAMS[1+]>ENGA.DATE%=TextIf((%INDI.FAMS[1+]>_STAT% = 'Divorced') or Exists(%INDI.FAMS[1+]>DIV.DATE%),' ~ Divorced',) %INDI.FAMS[1+]>DIV.DATE%

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

Diagrams: Multiple Spouses

Post by davidf » 14 Jun 2011 16:18

Yes, that looks much neater.

Thanks
David

Locked