Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Custom Search Function -> Sort Date.

Go to End

2 Posts   1433 Views


Community Member, 2 Posts

4 August 2016 at 8:33pm

Hi Guys,

I've wrote a custom search function that search's through 4 models for data, I then join the 4 data querys into an array() and then try and sort it by $Date.

The sorting by $Date works ok but it groups it by the relevant models and doesn't sort it by the overall array.

Is it possible to sort a PaginatedResult by a certain field?




Community Member, 49 Posts

5 August 2016 at 5:37pm

Are you merging the results or using a UNION?