What do you think about this expression syntax?
<%
<% if (<recipient.age >= 40) {
%>Good morning <%recipient.firstName! %> <%
}
else if (<FIELD>==<VALUE>) {
%>Hi <%recipient.firstName %> <% }
%>
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
@ParthaSarathy Could you pls help me with the resolution for the issue m facing. its elaborated in "Read Javascript variables in Delivery"
Views
Replies
Total Likes
Views
Replies
Total Likes