Hello Craig, That doesn't work either. When I use the following line, it works: sort lines of field myList numeric by word 2 of each
But then when I try to do two sorts with the following line, I get the error message below: sort lines of field myList descending by word 1 of each & numeric by word 2 of each (Error) button "Button": execution error at line 2 (Handler: can't find handler) near "by", char 74 If I leave out the second "by" I get a compile error saying I need to put it in. At this point I am believing that there are lots of theories about how to make it work, but nobody actually knows how to make it work. Thank you anyway, Larry ----- Original Message ----- From: <dunb...@aol.com> To: <use-livecode@lists.runrev.com> Sent: Saturday, August 09, 2014 7:59 AM Subject: Re: sorting > Way back from 1987, and undocumented everywhere except in the user notes in > the dictionary here, is this; > > > > Multiple stable sorts may be implemented directly by concatenating sortKeys: > > > sort container by sortKey1 & sortKey2 & sortKey3... > > > Sortkey order determines the sorting sequence > > > So you can: > > > sort lines of yourList by word 1 of each & word 3 of each > > > Craig Newman > > > > -----Original Message----- > From: Alex Tweedly <a...@tweedly.net> > To: use-livecode <use-livecode@lists.runrev.com> > Sent: Sat, Aug 9, 2014 5:52 am > Subject: Re: sorting > > > Larry, > can you be more explicit about how it doesn't work ? > > Actually, can you explain better what you want to do ? You said you want > to sort by the 2nd and then the 3rd word - but gave an example that > appeared to show sorting by 2nd and 1st - and not even have a 3rd word > in any line. > > So how about a slightly less terse description, and an example showing > both "before" and "after" and hopefully we can get you to where you want > .... > > -- Alex. > > > On 09/08/2014 09:14, la...@significantplanet.org wrote: >> Sorry, that doesn't work >> >> ----- Original Message ----- From: "Björnke von Gierke" <b...@mac.com> >> To: "How to use LiveCode" <use-livecode@lists.runrev.com> >> Sent: Saturday, August 09, 2014 12:58 AM >> Subject: Re: sorting >> >> >>> sort theList by word 2 of each >>> sort theList by word 1 of each >>> >>> sort order is retained in-between commands, that's why it works. >>> >>> On 09 Aug 2014, at 08:24, la...@significantplanet.org wrote: >>> >>>> I have a field I want to sort. >>>> Each line has 4 words. >>>> I want to sort by the first word (ascending) and then do a 2nd sort >>>> by the 3rd word without changing the order of the first word. >>>> >>>> Example: >>>> >>>> apple box >>>> apple pie >>>> apple zoo >>>> baby blue >>>> baby rattle >>>> baby zoo >>>> etc. >>>> >>>> TIA >>>> Larry >>>> _______________________________________________ >>>> use-livecode mailing list >>>> use-livecode@lists.runrev.com >>>> Please visit this url to subscribe, unsubscribe and manage your >>>> subscription preferences: >>>> http://lists.runrev.com/mailman/listinfo/use-livecode >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode