Use if function for words not just numbers

If you have a drop down menu for he/she/they labeled gender. Be able to say {if gender=he then "him" else if gender=she then "her" else if gender=they then "them"}

Hi @Kirsten_Cockriel
That is possible today:

{note}{formmenu: he; she; default=they;name=gender}{endnote}{if: gender="he"}him{elseif: gender="she"}her{else}them{endif}

@Dan_Barak1 Sorry. When I use this it outputs "hehim" and "sheher". So it seems to be taking the form value as well as the value that's meant to go in. Any idea how to fix this?

I fixed the snippet above. Try again now.

Amazing! That worked. Thank you! Is there any way to simplify the addition of gender formulas? I know PhraseExpress has this as a built-in option (you can just select gender and it does it for you). Putting in he/she/them and his/her/they etc is a major part of any medical or legal report writing so I wonder if it could be built in as a core feature. Anyway, I think I can make this work but I am always looking for ways to reduce friction. Thank you so much for fixing this one!


I'm voting for this ! an easy ton simplify gender selection and toggle accross the snippet, without reusing if,elseif,else every time.

Hi @Steven_Willis,

I'm a bit late to the party, but here's my take on your question:

{note}Gender: {formmenu: default=Neutral; Female; Male; name=preferredgender}

{endnote: trim=right}
{note: preview=no}
{if: preferredgender="Neutral"}
{`they she he`="they"}
{`them her him`="them"}
{`their her his`="their"}
{elseif: preferredgender="Female"}
{`they she he`="she"}
{`them her him`="her"}
{`their her his`="her"}
{elseif: preferredgender="Male"}
{`they she he`="he"}
{`them her him`="him"}
{`their her his`="his"}

{endnote: trim=right}

Your team leader is Sasha. Please visit {=`them her him`} in {=`their her his`} office so that {=`they she he`} can brief you.

Here's what's happening.

I'm using a dropdown menu to determine the preferred gender.

Next, I'm using the {if} command to cater for each one of the three choices.

For each choice, I'm creating three form variables:

  • `they she he`
  • `them her him`
  • `their her his`

and assigning to them the correct pronoun accordingly.

Inside the Text Blaze dashboard, you'll notice that whenever you create a form variable, it shows up as a clickable button in the commands sidebar. See image below for example:


So, whenever I need to type something and require a pronoun, I can look at my variables and click the one I need. The labels make this easy.

The list isn't exhaustive of course, but you can add more using the same framework.

Hope this helps :slight_smile:


Just got to use this today. Absolutely genius.

1 Like