Sorting Lines by Item

Stewart Lynch slynch at richmond.sd38.bc.ca
Thu Sep 1 19:10:51 EDT 2005


I have data that needs to be sorted a certain way after I bring it in to a
text field called DataField

Each line in the data has 6 items separated by a tab so I can set the
itemdelimeter to Tab
I need to sort the data by Item 2 then Item 3 then Item 4.
So, for example
3838033	R.  Chin	1	B	XESL 11	12
3838033	R.  Chin	2	C	XESL 10	17
3838033	J.  Clemente	1	B	SCH 11	23
3838033	R.  Chin	1	D	XESL 11	15
3838033	R.  Chin	2	B	XESL 11	15
3838033	R.  Chin	1	C	XESL 10	11
3838033	J.  Clemente	1	A	SS 9	27
3838033	R.  Chin	1	D	XESL 10	16
3838033	J.  Clemente	1	A	SCH 11	27
3838033	J.  Clemente	1	D	SCH 9	26
3838033	J.  Clemente	2	A	SS 11	26
3838033	J.  Clemente	1	B	SCH 9	28
3838033	J.  Clemente	1	C	SCH 10	29

Gets sorted as

3838033	J.  Clemente	1	A	SS 9	27
3838033	J.  Clemente	1	A	SCH 11	27
3838033	J.  Clemente	1	B	SCH 11	23
3838033	J.  Clemente	1	B	SCH 9	28
3838033	J.  Clemente	1	C	SCH 10	29
3838033	J.  Clemente	1	D	SCH 9	26
3838033	J.  Clemente	2	A	SS 11	26
3838033	R.  Chin	1	B	XESL 11	12
3838033	R.  Chin	1	C	XESL 10	11
3838033	R.  Chin	1	D	XESL 11	15
3838033	R.  Chin	1	D	XESL 10	16
3838033	R.  Chin	2	B	XESL 11	15
3838033	R.  Chin	2	C	XESL 10	17

I see that there is the command

Sort lines of field DataField by item 2

What would I do to have the lines sorted by item 2,3 and 4 in that order?

*******************************************
........
:  o/  : Stewart Lynch
: <|   : Director of Instruction, Technology and Information Services
: / >  : Richmond School District
:......:   Richmond, BC Canada
Internet: slynch at richmond.sd38.bc.ca
https://public.sd38.bc.ca/~slynch
tel. (604) 668-6128 fax: (604) 668-6006
*******************************************







More information about the use-livecode mailing list