OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

FreeMarker/NetSuite PDF Template - Double sorting by date, with possible empty values

  • Thread starter Thread starter Edgardo Barría Melián
  • Start date Start date
E

Edgardo Barría Melián

Guest
I need to sort a list of records and render them in a table, but they have to be sorted by a "From Date" column, and then by "To Date" at a second level. I checked the documentation for ?sort_by but it doesn't mention any support for double sorting.

Thought these would work but it's doing a different thing.

Code:
<#list invoices?sort_by(['from_date', 'to_date']) as inv>

Code:
<#list invoices?sort_by("from_date")?sort_by("to_date") as inv>

Also, some records have empty values for "From Date" or "To Date".

Unsorted table
Continue reading...
 

Latest posts

Top