Expression fragment - new to Campaign V8
What do you think about this expression syntax?
<%
<% if (<recipient.age >= 40) {
%>Good morning <%recipient.firstName! %> <%
}
else if (<FIELD>==<VALUE>) {
%>Hi <%recipient.firstName %> <% }
%>
What do you think about this expression syntax?
<%
<% if (<recipient.age >= 40) {
%>Good morning <%recipient.firstName! %> <%
}
else if (<FIELD>==<VALUE>) {
%>Hi <%recipient.firstName %> <% }
%>
Hi @michael_soprano ,
This is normal 'If - else if - else' condition. But the correct syntax is as follows,
<% if ( recipient.age >= 40 ) { %>
Good morning <%= recipient.firstName %>
<% } else if ( recipient.age == 30 ) { %>
Hello <%= recipient.firstName %>
<% } else { %> Hi <%= recipient.firstName %> <% } %>
recipient.age > This will fetch recipient's Age from the database
<%= recipient.firstName %> > This print's recipient's Firstname in the email.
So, If the Age is greater than or equal to 40, the recipient will receive email as Good morning Abcd; whereas if the age is 30, the receive mail as Hello Abcd, and rest of the recipients will receive email as Hi Abcd
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.