Sorting a multi list

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 12, 2024   (RSS)

By Djulia - December 12, 2024

Hi ,

Have you tried with orderBy?

// load records from 'timeline'
list($timelineRecords, $timelineMetaData) = getRecords(array(
  'tableName'   => 'timeline',
  'loadUploads' => true,
  'orderBy'     => 'start_year DESC', // or ASC
  'allowSearch' => false,
));

Thanks,
Djulia

By Mikey - December 12, 2024

Hey Djulia,

Thanks for the tip. I sorted it out using your tip and the line of code below. 

    'orderBy'     => 'num ASC', // or DESC

Have a great day!