Page 1 of 1

Marriage Count Fact Sentence Template help

Posted: 29 Jan 2021 00:58
by kelvin
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 !!)

Re: Marriage Count Fact Sentence Template help

Posted: 29 Jan 2021 11:07
by tatewise
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")))}

Re: Marriage Count Fact Sentence Template help

Posted: 29 Jan 2021 12:56
by kelvin
Brilliant. Many thanks Mike.

Just what I wanted.