Velocity script token conditional "not" is not working
Hello I have been trying to get an email token working using a NOT operator but the token shows Herr or Frau when the salutation fields does contain these strings and not displaying the default greeting.
I have written the code in a couple different ways with the same result.
#if ($lead.Salutation != "Herr")
#set($greeting = "${lead.Salutation},")
#elseif ($lead.Salutation != "Frau")
#set($greeting = "${lead.Salutation},")
#else
#set($greeting = "Sehr geehrte Damen und Herren,")
#end
${greeting}
Second try:
#if( !(${lead.Salutation} == "Herr") || !(${lead.Salutation} == "Frau") )
#set($greeting = "${lead.Salutation},")
#else
#set($greeting = "Sehr geehrte Damen und Herren,")
#end
${greeting}
Hope someone can point out where I am going wrong.
Note this is part of a larger salutation script but I isolated down to this part not working.
thanks,
Kevin.