+ Start a Discussion
Mike Davis 43Mike Davis 43 

mailmerge with conditional fields

I have a user that would like to have his email templates refer to a contact by their Nickname-unless that field is blank.  In which case, refer to them as the Contact First Name.  I've tried this format, but it's not working...

{!if(Contact.Nickname_Alias__c ="", Contact.FirstName,) Contact.Nickname_Alias__c }
 
Best Answer chosen by Mike Davis 43
sachin kadian 5sachin kadian 5
you are not properly closing the braces.

{!if(Contact.Nickname_Alias__c = "", Contact.FirstName, Contact.Nickname_Alias__c )}

All Answers

sachin kadian 5sachin kadian 5
try this

{!IF(NOT(ISBLANK(Contact.Nickname_Alias__c)),Contact.Nickname_Alias__c,Contact.FirstName)}
sachin kadian 5sachin kadian 5
you are not properly closing the braces.

{!if(Contact.Nickname_Alias__c = "", Contact.FirstName, Contact.Nickname_Alias__c )}
This was selected as the best answer
Mike Davis 43Mike Davis 43
That did it!  Thank you so much.
sachin kadian 5sachin kadian 5
Glad it solved your issue.

Please mark the answer solved so that it can help others.