I was hoping to use {=TextIf(%FACT._SHAR[1]>SEX%= "Male", "wife", "husband")} in the following witness sentence:
'...to visit {him/her} and {his/her} {=TextIf(%FACT._SHAR[1]>SEX%= "Male","wife","husband")}' where the Witness was the person being visted to return:
'...to visit him and his wife.' if the witness was male and
'...to visit her and her husband.' if the witness was female.
However, although this works for male witnesses, it returns '...to visit her and her wife.' when the witness is female!
I would appreciate any help in getting the syntax right.
* Conditional Text for Witnesses
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Conditional Text for Witnesses
Yes, that is quite a tricky scenario.
Your problem is that FACT._SHAR[1]> refers to the 1st Fact Witness who might not be the current witness.
So use the shortcut CUR~WITN> which always refers to the current witness.
See the Help for Understanding Data References.
Better than testing the SEX field I advise using the =Sex(...) function:
{=Sex( %CUR~WITN>%, "wife", "husband", "partner")}
Your problem is that FACT._SHAR[1]> refers to the 1st Fact Witness who might not be the current witness.
So use the shortcut CUR~WITN> which always refers to the current witness.
See the Help for Understanding Data References.
Better than testing the SEX field I advise using the =Sex(...) function:
{=Sex( %CUR~WITN>%, "wife", "husband", "partner")}
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Conditional Text for Witnesses
Thank you Mike. Once again you have come to my rescue. I found that both your proposed solutions worked.