Default Sort Order for Aggregate Table by Count of Record IDs

  • 1
  • Question
  • Updated 2 years ago
  • Answered
This is probably simple, but what syntax to I use on an aggregate table to default the sort order so that the category with the highest number of records is first?
Photo of Shane Steele

Shane Steele

  • 220 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Shane,

You'll put the function and field of whichever field is the "number" field in the Fields to order records by property of the aggregate model. For example, I have an aggregate Account model that groups by Industry and has an aggregation on Id. If I want to show the records sorted by count high to low, then I put COUNT(Id) DESC into the Fields to order records by property
Photo of Shane Steele

Shane Steele

  • 220 Points 100 badge 2x thumb
That worked, thanks so much!