Hi,
I created a loop in an Email Script token that is as follows:
<table>
#foreach($licenseSubscription in $licenseSubscription_cList)
<tr><td>$foreach.count</td><td>${licenseSubscription.serviceName}</td></tr>
#end
</table>
It works in listing all Custom Objects for the lead. What I want to do is to only list Custom Objects (Licenses) with License Type (licenseType) == Trial.
I tried something like this but it is not rendering in the template:
<table>
#foreach($licenseSubscription in $licenseSubscription_cList)
#if ($licenseSubscription.licenseType == "Trial") {
<tr><td>$foreach.count</td><td>${licenseSubscription.serviceName}</td></tr>
}
#end
</table>
Any feedback as to how I would structure the script to only apply for those with a specific value?
Solved! Go to Solution.
Remember to #end your #if.
Thank you for the help Sanford, works like a charm now