* Witness role sentence problem

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
User avatar
Robert Jacobs
Famous
Posts: 111
Joined: 21 Mar 2015 18:03
Family Historian: V7
Location: Ellensburg, Washington, U.S.A.
Contact:

Witness role sentence problem

Post by Robert Jacobs » 16 Apr 2023 04:17

This sentence works perfectly for two or more children but not for one. It's a witness sentence for the role "child"

<{role(plural)=child}, lived with their parents><{role(single)=child} lived with {=TextIf(%CUR~WITN>SEX% = "Male","his","her")} parents>, <at {address}> {place} {date}<{note}>

Here is the output:
Jane Doe lived with {=TextIf(%CUR~WITNSEX% ="Male","his","her")} parents>, at 2321 Tiebout Avenue in Yonkers, New York on June 1, 1925.

I also tried it using {his/her} and {couple} in place of the TextIf function.

I'm sure I'm doing something wrong that will turn out to be perfectly obvious once someone who knows explains it.

Thanks to all.

Robert

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

Re: Witness role sentence problem

Post by tatewise » 16 Apr 2023 10:24

I suspect that even with multiple children it includes lived with {=TextIf(%CUR~WITNSEX% ="Male","his","her")} parents

This is a popular trap. Angle < brackets > can only enclose one curly { bracket } code or function, because it uses that one item to conditionally include the contents of the < brackets >. If there are multiple { bracket } items which one does it use to determine the condition?

Sometimes it is possible to substitute the {=CombineText( ... )} function which specifically uses parameter 2 as the condition. However, functions do not allow codes like {role(single)=child} or {date} within their parameters. So in this case that option is not feasible. You will just have to use the word their as you do for plural children.

Either functions need to be enhanced to allow { codes } in parameters or another enhancement such as the Wish List Ref 577 Sentence Template Functions to Replace Codes is needed, so please Vote for it.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Robert Jacobs
Famous
Posts: 111
Joined: 21 Mar 2015 18:03
Family Historian: V7
Location: Ellensburg, Washington, U.S.A.
Contact:

Re: Witness role sentence problem

Post by Robert Jacobs » 16 Apr 2023 13:23

Dear Mike,

Thanks so much. I've voted. Here's the version I've settled on, for the moment at least:

<{role(plural)=child}><{role(single)=child}> lived with {couple} <at {address}>< in {=TextIf (ContainsText(%FACT.PLAC%, "Bronx", STD), "the Bronx", %FACT.PLAC%)}> {date}{note}

It seems to do the job at the cost of a little concision.

I know that "correct" language is always a moving target, but I'm too old to enjoy today's changing use of pronouns. They look and sound wrong to me.

All good wishes.

Robert

Post Reply