Sorting by item ... of each and item ... of each

matthias_livecode_150811 at m-r-d.de matthias_livecode_150811 at m-r-d.de
Sat Sep 2 20:59:02 EDT 2023


Maybe i do not see the forest for the trees....

I have a tab delimited list which i want to sort. I am using this code to sort it by item 3 and  item 2

set the itemdelimiter to tab
sort lines of tList numeric by item 3 of each and item 2 of each.

But that code does not sort as i expected it. Column 2 is not sorted correctly.
The following list is the result. 

113254;8420;3016365
113254;8423;3016365
113254;8422;3016365
113254;8420;3016365
113254;8420;3016365
113254;8420;3016365
113254;8421;3016365
203212;8420;3016366
203212;8423;3016366
203212;8422;3016366
203212;8420;3016366


My expectation for example  was that for value 3016365 in column 3 the values in Col 2 would be sorted like this

113254;8423;3016365
113254;8422;3016365
113254;8421;3016365
113254;8420;3016365
113254;8420;3016365
113254;8420;3016365
113254;8420;3016365

Tried also    'by item 2 of each and item 3 of each', but the sort result is the same?

Am i missing something?

Regards,
Matthias




More information about the use-livecode mailing list