Use Conditional Content to Substitute a Mail Merge Tag with a Predefined Phrase When the Member Doesn't Have the Demographic Specified in the Short Tag Print

  • Conditional Content, merge tags, predefined phase, Demographics
  • 0

How to replace "Dear <First Name>" with <Hello Friend> if the first name doesn't exist:

Add the following tag to your mailing.

The tag below will pull data from column (First_Name_), however, any column name can be inserted and used.


%%set name [merge members_.First_Name_] ; if { $name == "" } { return "Hello Friend," ; } else { return "Dear $name," ; }%%


Here is an example of what is displayed if no value is found in column (First_Name_):

From: thomass-2@lm10xtest.lyris.com [mailto:thomass-2@lm10xtest.lyris.com]
Sent: Tuesday, March 27, 2012 12:30 PM
To: testing
Subject: Support Test

Hello Friend,  

---------------------------------------------------------------------------------------------

Here is an example of what is displayed if first name exists in column (First_Name_)

From: thomass-2@lm10xtest.lyris.com [mailto:thomass-2@lm10xtest.lyris.com]
Sent: Tuesday, March 27, 2012 12:30 PM
To: Tom Tom
Subject: Support Test

Dear Tommy,  

Was this answer helpful?

« Back