 |

soj
User
Mar 25, 2008, 6:33 PM
Post #1 of 3
(181 views)
Shortcut
|
|
Reorder records
|
Can't Post
|
|
Hi all, I'd like to reorder records in a staff list. Can anyone tell me how to do this via the system? Ascending vs Descending would be enough. TIA! soj
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 25, 2008, 8:17 PM
Post #2 of 3
(176 views)
Shortcut
|
Hi soj, You can specify the sort order in the "Order By" field in the section editor or in the list viewer. So, say you had a stafflist with a field called fullname, you could sort by the name (in ascending order) with this option: $options['orderBy'] = "fullname"; Because this is just a regular MySQL "Order By" clause, you can use standard MySQL. So to sort in descending order you just add "DESC" after the fieldname like this: $options['orderBy'] = "fullname DESC"; Would that work for you? Let me know if it will or if there was something else you were trying to do. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

soj
User
Mar 25, 2008, 8:34 PM
Post #3 of 3
(173 views)
Shortcut
|
Wow, I missed that option in the editor. I'd like to order by 'record number' ascending, but it's not taking. soj Update - I found what I was doing wrong - I confused field name with field label. Thanks!
(This post was edited by soj on Mar 26, 2008, 7:11 AM)
|
|
|  |
|