Yay, another Velocity question A while back, I had an issue with getting our script to pull up the most recent entry of a custom object, and the community (or, well, @Sanford Whiteman) came to the rescue and helped me fix it.Seems my fix was almost a little too good, because now it's pulling the most recent entry, even in cases where that entry is invalid. In this case, we're using custom objects to pull data for appointment confirmation emails. If a customer decides, "oh hey, I want to book a new appointment," they'll book a new one and cancel the old one. If they cancel the old one after booking the new one, that's now the object entry with the most recent modifications, so they're getting the cancelled data instead of the actual appointment.Here's the script for what I'm using currently: #if( $appointment_cList && !$appointment_cList.isEmpty() ) #set( $firstItem = $appointment_cList[0] ) #set( $lastItem = $appointment_cList[$math.sub($appointment_cList.size(),1)] ) #end$lastItem.appointmentDateSimple,