Pages: 1
RSS
prefix name macro condition, template with name of the person with prefix and first name
 
I read the Programming and Regular Expressions part of the help file ( https://www.ritlabs.com/en/support/help/73/ ) but I still can't understand the conditional part.
How do I make a template which will insert the Prefix from Address Book in front of the first name of the person but only if the Prefix exist in Address Book. If Prefix does not exist, to insert the first name only?
I tried this:
Code
%AbTONamePrefix %TOFNAME
It didn't work. What it does is makes the Prefix appear twice, like: Mr Mr Sergey, instead of: Mr Sergey.
 
Code
Dear %IF:"%AbTONamePrefix"=0:"%TOFNAME" %IF:"%AbTONamePrefix"<>0:%AbTONamePrefix %AbTOFirstName=%TOFNAME, 
That kind of worked. No idea why. Would be nice to have a page in help file which explains how to do such kind of things. It's not that I understand what I did, I just tried and it worked. But doing something you don't know why and what, is not the best thing or way to do it :)
Pages: 1