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
* Witness role sentence problem
- Robert Jacobs
- Famous
- Posts: 111
- Joined: 21 Mar 2015 18:03
- Family Historian: V7
- Location: Ellensburg, Washington, U.S.A.
- Contact:
- tatewise
- Megastar
- Posts: 27075
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Witness role sentence problem
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.
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
- 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
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
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