Question
When using the Search command you have the possibility to add a parameter order.
e.g. order="editby"
but is there also a possibility to make the sort on different columns thus
eg. first on "editby" and then on "modified"?
I tried several things but I could not find a solution
Is this possible?
Environment
--
FrederikBeun - 27 May 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
As far as I can tell,
VarSEARCH will only allow one key. That documentation topic suggests using a formatted table sorted with
TablePlugin's initsort, but
that only supports one key too.
Hopefully someone else has a better way to do this, but here's a work-around: hide the secondary key in the same column as the primary key, so that a search on that column uses the combined key. If the secondary key is a date (as you requested), use
$isodate to make the combined key sortable. You don't have to display the date in that form though (e.g., used
$date below).
Here is a sort by column 2 then column 3:
For comparison, here is a sort by column 2 only,
For bonus points, you could play around with the table format to make it
look like a straight search result.
--
SeanCMorgan - 27 May 2008
Cool workaround Sean, thanks for sharing!
--
PeterThoeny - 28 May 2008
Good idea thanks, you helped me a lot
--
FrederikBeun - 30 May 2008