sorting a container by multiple items?

J. Landman Gay jacque at hyperactivesw.com
Wed May 3 19:07:29 EDT 2006


Sarah Reichelt wrote:

> Sorts are non-destructive so you can just do sequential sorts and you
> should get what you need e.g.
>  sort lines of fld "userTasks" by item 2 of each
>  sort lines of fld "userTasks" by item 15 of each
> (or possibly the other way around).
> 
> As always operating on variables is faster than fields, so if the
> "userTasks" field has a lot of data, it would be faster to put it into
> a variable, sort the variable and then put it back into the field.
> 
> There is a way to do the custom sort function but I always forget it
> and rely on Jacque to remind me :-) However in this case, I think it
> is overkill.

I agree. Sequential sorts are better for this case. And if it helps, I 
always have to look up my notes when I write a custom sort. ;)

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the Use-livecode mailing list