I have a data extension that tells me if the status is bronze, silver or gold. I have another with a boolean that tells me if it’s active (0 or 1).

If status is bronze or silver or gold and active

(Set subject line 1)


If status is bronze or silver or gold and not active
(Set subject line 2)


If status is trial and active

(Set subject line 3)


Make sure that your conditions really are like the following, it is different when you comebine (... or status =="gold") and @status == "active or if you write (... OR @status == "silver") or (status =="gold" and @status == "active )


var @status, @booleanField, @subjectline
set @status = [status]
set @booleanField = [nameOfTheBooleanFieldInTheDataextension]

IF (@status == "bronze" OR @status == "silver" OR  @status =="gold") AND @booleanField == "active" THEN
    set @subjectline = "A"
ELSEIF (@status == "bronze" OR @status == "silver" OR  @status =="gold") AND @booleanField != "active" THEN
    set @subjectline = "B"
ELSEIF @status == "trial" and @booleanField == "active"
    set @subjectline = "C"
/* Best Practise would be to always include all possible conditions therefore the ELSE condition should be here */
    set @subjectline = "D"



More for subjectline can be found in this post

  • Thanks, this works.
    – Anthony_Z
    Jul 9 '19 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.