[TIP} co-sort variable 1 based on values in variable 2

Dick Kriesel dick.kriesel at mail.com
Tue Mar 20 19:34:56 EDT 2007


On 3/20/07 2:36 PM, "Jim Ault" <JimAultWins at yahoo.com> wrote:

> I could not find an easy way to get "sort by each" to handle this, unless it
> built a script local or global to hold the original 'x', so I just used an
> array.

Hi, Jim.  Here's a way:

split varB by comma
sort items of varA descending by varB[itemOffset(each,varA)]

-- Dick





More information about the use-livecode mailing list