Hi all,
I have a CSV like the extract below that I have read into Applescript in as an array:
"Customer GUID","Form GUID","Contact GUID","Form Type","Ref No","Account Number","Company Name","Contact Name","Contact Address","Email address","Artwork awaiting Response","Days no Response","Special Pricing","Despatch Date"
^^^ Column headings, not stored in array
"2C7B2550-7C3B-43F4-B3A7-7BC271A56FA4","031AA79C-80BA-4159-9B21-139548CB0BEE","7F99B8A9-54BB-44E1-BEC8-C0D15984E475","QT","2542","M0080P","SENSOREDCOMPANYNAME","SENSORED_CONTACTNAME","SENSORED_CONTACTADDRESS","SENSORED_EMAILADDRESS","No","1","No","" "A9C7CE4D-8DE0-416F-9AFD-1AFA6273CBF1","F379BA62-18A2-43D9-A232-A29E88FA764C","7FE82869-F9DF-4CB0-A1A7-6CF33CFE29FD","QT","2543","R0075P","SENSOREDCOMPANYNAME","SENSORED_CONTACTNAME","SENSORED_CONTACTADDRESS","SENSORED_EMAILADDRESS","No","1","No",""
Different extract showing how the array is stored in Applescript:
{{"1C0096C0-613C-42E4-BF8D-768ADB7DAE5C", "E908B072-F1F2-4A08-93E8-6F9F36E74721", "E81FC87C-C79B-4BE2-88BC-79BB9F3B6819", "SO", "2891", "R0014C", "SENSOREDCOMPANYNAME", "SENSORED_CONTACTNAME", "SENSORED_CONTACTADDRESS", "SENSORED_EMAILADDRESS", "No", "7", "No", "14/06/2010 - Fully Despatched"}, {"5C06971B-90BD-47C6-94A1-B0DA8BCFAD5B", "8DC5A202-EE84-4E78-97C2-F0D39B2FEB99", "C7FA819A-1E09-40FB-B274-A10DBF3A6745", "SO", "2892", "B0091C", "SENSOREDCOMPANYNAME", "SENSORED_CONTACTNAME", "SENSORED_CONTACTADDRESS", "SENSORED_EMAILADDRESS", "No", "7", "No", ""}}
---
I need a quick sort routine that will simply sort this array by a specified column. Eg: my sortArraybycolumn(theList,5)
Any help much appreciated.
Richard Lake Marketing Manager Tel: 0800 158 3898 | Email: email@hidden
|