In CO list, there are total eight field in which one field is date and second field item type. Business requirement is to sort it based on item type first after that again sort it by date field type.
custom objects(default_c) ,
field
Date(date),
Item Type(itemType)
And, counter is running for up to two times. what will be best way to sort it again and again in Velocity script?
Solved! Go to Solution.
#set( $mySortedList = $sorter.sort( $myList, ["field1","field2"] ) )
Note this is all functionality built into SortTool — you don't need to (nor do you have to, at least typically) write your own sorting routine.
(It's also one call to $sorter.sort, you don't see the comparisons happening as that's all under the hood.)
#set( $mySortedList = $sorter.sort( $myList, ["field1","field2"] ) )
Note this is all functionality built into SortTool — you don't need to (nor do you have to, at least typically) write your own sorting routine.
(It's also one call to $sorter.sort, you don't see the comparisons happening as that's all under the hood.)