Sorting a multi list

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

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

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!