Badges
Accepted Solutions
Likes Received
Posts
Discussions
Ideas
Blog Posts
Thanks Sanford. I Just read your reply. I understand what you are saying, but think that it would be much nicer to handle this the way SQL handles it, with a default sort order for NULL values or allowing you to declare the sort order for NULL. Short of that, to silently fail and return *nothing*...
Did some more testing. There is another date field on the custom object, ("policyEffectiveDate") which is never empty. I tried sorting on that and all works fine. Then, I found some leads that had values for all of the the "policySalesDate" fields. Again, this worked fine.So my conclusion is th...
I experimented sorting by the policyId (text field):#set ($sortedList = $sorter.sort($rawList,"policyId:desc")) This works fine, it returns a sortedList to $sortedList as expected.The issue seems to be with the custom object policySalesDate date field. $sorter.sort does not like it for some reason...
I have a velocity script as follows:#set ($rawList = $CstPolicyList)#set ($sortedList = $sorter.sort($rawList,"policySaleDate:desc")) Here is Sorted List: #if($sortedList.size() > 0)
| ID | Sale Date |
|---|---|
| $policy.policyId | $!policy.policySaleDate |