Sorting a container

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
warrenk
Posts: 110
Joined: Sun Sep 21, 2008 5:39 am

Sorting a container

Post by warrenk » Fri May 01, 2009 1:21 pm

Is it possible to sort by more then one item?

ie. sort lines of tPoList by item 2, item 4 of each

I need to sort with multiple items and cannot find any examples of how this is done.

Thanks!
Warren

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Fri May 01, 2009 3:02 pm

Warren,

from the user part of the documentation of Rev 3.5

Multiple stable sorts can be effected in a single line by appending successive sortkeys:
sort container by sortkey1 && sortkey2 && sortkey3...
The sorting follows the sortKeys order.

regards
Bernd

warrenk
Posts: 110
Joined: Sun Sep 21, 2008 5:39 am

Post by warrenk » Fri May 01, 2009 3:14 pm

Bernd,

Good news! Thanks for your help!!!

Warren

Post Reply