Help with velocity script
Hello all,
as the title says, I need help with a velocity script I'm planning to use on a campaign to be sent out in the next days. Let me start by saying that I am not a developer, so the extent of my ability with Velocity is quite limited...
The velocity script simply shows a list of names and dates in a table-like format, but I've come across a couple of obstacles:
1. the date format seems to be the "american" one (mm-dd-yyyy), however it would be best if it showed in the "european" format (dd-mm-yyyy). A workaround I found to avoid adding more code to the script is to have the "Date" field on the custom object as a string instead of a date, but I fear that doing so might hinder or limit some features related to smart campaign operators.
2. this is the most important: is there a way to limit the number of records appearing on the email to just those that are added each time? For example, if I use the "Added to custom object" trigger to send an email to a lead that already has 4 records in his custom object, adding 2 new records to it, my goal would be for the email to show only the 2 new records added, but it instead shows all 6 records.
This is the code (very simple) that I am using:
<table>
<tr>
<td>Name</td>
<td> </td>
<td>End date</td>
</tr>
#foreach ($CustomObject_c in $CustomObject_cList)
<tr>
<td>${CustomObject_c.lastName} ${CustomObject_c.name}</td>
<td> </td>
<td>${CustomObject_cList.endDate}</td>
</tr>
#end
</table>
What can I do?
Thanks,
Francesco