* Marriage Count Fact Sentence Template help

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
kelvin
Silver
Posts: 9
Joined: 01 Oct 2005 00:42
Family Historian: V6.2

Marriage Count Fact Sentence Template help

Post by kelvin » 29 Jan 2021 00:58

The Marriage Count Fact Sentence Template is:

{individual} had {value} {'spouses'} {date} {place} {age}

which I am happy with where the Marriage Count is >1

I have used this fact to set the value to 0 for persons whom I know never married & what I'd like to output is:

He/She was unmarried

in this case, & as the current setting if the count is >1 (without the {date} etc values which seem superfluos to me).

I had coded it just recently but after a PC crash lost my custom definition & I can no longer 'code' it correctly.

So any help would be much appreciated. Many thanks

(PS I've downloaded the plugin "Backup and Restore family Historian Settings" now so that I don't lose my settings again !!)

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

Re: Marriage Count Fact Sentence Template help

Post by tatewise » 29 Jan 2021 11:07

Try the following:
{=Sex(%CUR_PRIN%,"He was","She was","They were")} {=TextIf(%FACT%="0","unmarried",TextIf(%FACT%="1","married once",Text("married to ".%FACT%." spouses")))}

That says "He was/She was/They were unmarried/married once/married to N spouses."

A variant is:
{individual} {=TextIf(%FACT%="0","never married",TextIf(%FACT%="1","married only once",Text("married ".%FACT%." spouses")))}
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
kelvin
Silver
Posts: 9
Joined: 01 Oct 2005 00:42
Family Historian: V6.2

Re: Marriage Count Fact Sentence Template help

Post by kelvin » 29 Jan 2021 12:56

Brilliant. Many thanks Mike.

Just what I wanted.

Post Reply