What I had:
=ExistsText(%INDI.DEAT[1+]%,"✝") %INDI.DEAT[1+].DATE:COMPACT% in %INDI.DEAT[1+].PLAC:TIDY%
But I want it nuanced:
=TextIf(%INDI.DEAT[1+]%, TextIf(HasFlag(%INDI%, "KIA"), "⚔", "✝")) %INDI.DEAT[1+].DATE:COMPACT% in %INDI.DEAT[1+].PLAC:TIDY%
(Which doesn't work.)
Basically, I want the ✝ if I have death info, but I want to change it to ⚔ if the individual is flagged as killed in battle.
* Stacked Conditional Operators?
Stacked Conditional Operators?
Last edited by stewartrb on 15 Sep 2017 20:48, edited 1 time in total.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Stacked Conditional Operators?
You are nearly there Stewart.
The =TextIf(...) needs its first parameter to be boolean (true/false), so use Exists(%INDI.DEAT[1+]%)
e.g.
=TextIf( Exists(%INDI.DEAT[1+]%), TextIf( HasFlag(%INDI%,"KIA"), "⚔", "✝" ) , )
The =TextIf(...) needs its first parameter to be boolean (true/false), so use Exists(%INDI.DEAT[1+]%)
e.g.
=TextIf( Exists(%INDI.DEAT[1+]%), TextIf( HasFlag(%INDI%,"KIA"), "⚔", "✝" ) , )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Stacked Conditional Operators?
They do stack.
Thanks.
Thanks.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Stacked Conditional Operators?
You could also persevere with your original simpler expression:
=ExistsText( %INDI.DEAT[1+]%, TextIf( HasFlag(%INDI%,"KIA"), "⚔", "✝" ) )
BTW: If you don't record multiple Death Events the [1+] looping index is not needed, so just use:
=ExistsText( %INDI.DEAT%, TextIf( HasFlag(%INDI%,"KIA"), "⚔", "✝" ) ) %INDI.DEAT.DATE:COMPACT% in %INDI.DEAT.PLAC:TIDY% which defaults to INDI.DEAT[1] throughout.
=ExistsText( %INDI.DEAT[1+]%, TextIf( HasFlag(%INDI%,"KIA"), "⚔", "✝" ) )
BTW: If you don't record multiple Death Events the [1+] looping index is not needed, so just use:
=ExistsText( %INDI.DEAT%, TextIf( HasFlag(%INDI%,"KIA"), "⚔", "✝" ) ) %INDI.DEAT.DATE:COMPACT% in %INDI.DEAT.PLAC:TIDY% which defaults to INDI.DEAT[1] throughout.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry