Sort on multiple fields in a table

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Is there a way for a user to sort on multiple fields in a table?  I.e. "nested sort".  My users want to sort a list by Create Date (desc) and Score (asc) at the same time.  I don't want to build a filter or code or anything because this isn't used often.  They just want to be able to sort on multiple fields at the same time as needed.  Just like you can do in Excel.
Photo of Steve Chilcoat

Steve Chilcoat

  • 542 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Pat Vachon

Pat Vachon, Champion

  • 45,226 Points 20k badge 2x thumb
Certainly. On query of the model, you can set the Sort fields. "CreatedDate DESC, Score__c". Additionally, the table component can have the fields set as sortable.