CodeTinkerer

Array Tripple Filter

5 posts in this topic

Ok so I have some data I need filtered by 3 different Criteria.

 

I have it sorted by specified item, and arranged by item text, now I need it arranged by item time too.

 

Here is what I have:

Data Array:

$WFXArry[0][0] = 30
$WFXArry[0][1] = 20
$WFXArry[0][2] = Tech|Status|AD|Equip|||First Name|Last Name|Can Do
Skill:Time:Route|Can Do
Equip|Distance
In Miles|Drive
Time|Time Slot Minutes
Sched/Avail:Need|Shift
Start-End|Jobs
Asgn:Cp|Units
Asgn:Cp|Units
Total|Units
Target|Minutes
Max:Asgn:Avail|Company
$WFXArry[0][3] = 
$WFXArry[0][4] = 
$WFXArry[0][5] = 
$WFXArry[0][6] = 
$WFXArry[0][7] = 
$WFXArry[0][8] = 
$WFXArry[0][9] = 
$WFXArry[0][10] = 
$WFXArry[0][11] = 
$WFXArry[0][12] = 
$WFXArry[0][13] = 
$WFXArry[0][14] = 
$WFXArry[0][15] = 
$WFXArry[0][16] = 
$WFXArry[0][17] = 
$WFXArry[0][18] = 
$WFXArry[0][19] = 
$WFXArry[1][0] = 0648
$WFXArry[1][1] = ONJOB:15:25
$WFXArry[1][2] = 1
$WFXArry[1][3] = 2
$WFXArry[1][4] =  
$WFXArry[1][5] = 1
$WFXArry[1][6] = BT - DANE
$WFXArry[1][7] = ENTZMINGER
$WFXArry[1][8] = 
$WFXArry[1][9] = 
$WFXArry[1][10] = 
$WFXArry[1][11] = 
$WFXArry[1][12] = 
$WFXArry[1][13] = 08:00-19:00
$WFXArry[1][14] =   2:  7
$WFXArry[1][15] =   30:  67
$WFXArry[1][16] =   97
$WFXArry[1][17] =  120
$WFXArry[1][18] =  600: 116:  64
$WFXArry[1][19] = 
$WFXArry[2][0] = 0132
$WFXArry[2][1] = ONJOB:15:45
$WFXArry[2][2] = 3
$WFXArry[2][3] = 2
$WFXArry[2][4] =  
$WFXArry[2][5] = 1
$WFXArry[2][6] = BI - DEVIN
$WFXArry[2][7] = STOKES
$WFXArry[2][8] = 
$WFXArry[2][9] = 
$WFXArry[2][10] = 
$WFXArry[2][11] = 
$WFXArry[2][12] = 
$WFXArry[2][13] = 10:00-19:00
$WFXArry[2][14] =   8:  9
$WFXArry[2][15] =   40:  55
$WFXArry[2][16] =   95
$WFXArry[2][17] =   96
$WFXArry[2][18] =  480: 184:  -5
$WFXArry[2][19] = 
$WFXArry[3][0] = 0205
$WFXArry[3][1] = ONJOB:15:18
$WFXArry[3][2] = 3
$WFXArry[3][3] = 2
$WFXArry[3][4] =  
$WFXArry[3][5] = 1
$WFXArry[3][6] = BS - DAVID
$WFXArry[3][7] = EDGE
$WFXArry[3][8] = 
$WFXArry[3][9] = 
$WFXArry[3][10] = 
$WFXArry[3][11] = 
$WFXArry[3][12] = 
$WFXArry[3][13] = 10:00-19:00
$WFXArry[3][14] =   2:  3
$WFXArry[3][15] =   30:  45
$WFXArry[3][16] =   75
$WFXArry[3][17] =   96
$WFXArry[3][18] =  480: 109:  71
$WFXArry[3][19] = 
$WFXArry[4][0] = 0997
$WFXArry[4][1] = WAREHOUSE:15:58
$WFXArry[4][2] = 2
$WFXArry[4][3] = 2
$WFXArry[4][4] =  
$WFXArry[4][5] = 1
$WFXArry[4][6] = BT - CODY
$WFXArry[4][7] = WETTERLING
$WFXArry[4][8] = 
$WFXArry[4][9] = 
$WFXArry[4][10] = 
$WFXArry[4][11] = 
$WFXArry[4][12] = 
$WFXArry[4][13] = 08:00-22:00
$WFXArry[4][14] =   5:  6
$WFXArry[4][15] =   59:  70
$WFXArry[4][16] =  129
$WFXArry[4][17] =  156
$WFXArry[4][18] =  780: 302:  58
$WFXArry[4][19] = 
$WFXArry[5][0] = 0913
$WFXArry[5][1] = ONJOB:15:26
$WFXArry[5][2] = 1
$WFXArry[5][3] = 2
$WFXArry[5][4] =  
$WFXArry[5][5] = 1
$WFXArry[5][6] = AI - PETER
$WFXArry[5][7] = HARRISON
$WFXArry[5][8] = 
$WFXArry[5][9] = 
$WFXArry[5][10] = 
$WFXArry[5][11] = 
$WFXArry[5][12] = 
$WFXArry[5][13] = 08:00-19:00
$WFXArry[5][14] =   1:  5
$WFXArry[5][15] =   25:  55
$WFXArry[5][16] =   80
$WFXArry[5][17] =  120
$WFXArry[5][18] =  600:  92:  88
$WFXArry[5][19] = 
$WFXArry[6][0] = 1064
$WFXArry[6][1] = ONJOB:15:25
$WFXArry[6][2] = 2
$WFXArry[6][3] = 2
$WFXArry[6][4] =  
$WFXArry[6][5] = 1
$WFXArry[6][6] = AI - JAMES
$WFXArry[6][7] = FARACE
$WFXArry[6][8] = 
$WFXArry[6][9] = 
$WFXArry[6][10] = 
$WFXArry[6][11] = 
$WFXArry[6][12] = 
$WFXArry[6][13] = 08:00-19:00
$WFXArry[6][14] =   2:  3
$WFXArry[6][15] =   26:  66
$WFXArry[6][16] =   92
$WFXArry[6][17] =  120
$WFXArry[6][18] =  600:  98:  82
$WFXArry[6][19] = 
$WFXArry[7][0] = 0533
$WFXArry[7][1] = ONJOB:15:17
$WFXArry[7][2] = 2
$WFXArry[7][3] = 2
$WFXArry[7][4] =  
$WFXArry[7][5] = 1
$WFXArry[7][6] = BT - STEPHEN
$WFXArry[7][7] = SCHMITZ
$WFXArry[7][8] = 
$WFXArry[7][9] = 
$WFXArry[7][10] = 
$WFXArry[7][11] = 
$WFXArry[7][12] = 
$WFXArry[7][13] = 08:00-22:00
$WFXArry[7][14] =   8:  3
$WFXArry[7][15] =   62:  74
$WFXArry[7][16] =  136
$WFXArry[7][17] =  156
$WFXArry[7][18] =  780: 276:  82
$WFXArry[7][19] = 
$WFXArry[8][0] = 0047
$WFXArry[8][1] = ONJOB:15:56
$WFXArry[8][2] = 3
$WFXArry[8][3] = 2
$WFXArry[8][4] =  
$WFXArry[8][5] = 1
$WFXArry[8][6] = BT - CORD
$WFXArry[8][7] = WARDELL
$WFXArry[8][8] = 
$WFXArry[8][9] = 
$WFXArry[8][10] = 
$WFXArry[8][11] = 
$WFXArry[8][12] = 
$WFXArry[8][13] = 08:00-19:00
$WFXArry[8][14] =   2:  9
$WFXArry[8][15] =   27: 121
$WFXArry[8][16] =  148
$WFXArry[8][17] =  120
$WFXArry[8][18] =  600: 131:  49
$WFXArry[8][19] = 
$WFXArry[9][0] = 0998
$WFXArry[9][1] = ONJOB:15:16
$WFXArry[9][2] = 3
$WFXArry[9][3] = 2
$WFXArry[9][4] =  
$WFXArry[9][5] =  
$WFXArry[9][6] = AI - CHAD
$WFXArry[9][7] = CLAYTON
$WFXArry[9][8] = 
$WFXArry[9][9] = 
$WFXArry[9][10] = 
$WFXArry[9][11] = 
$WFXArry[9][12] = 
$WFXArry[9][13] = 08:00-19:00
$WFXArry[9][14] =   3:  4
$WFXArry[9][15] =   53:  53
$WFXArry[9][16] =  106
$WFXArry[9][17] =  120
$WFXArry[9][18] =  600: 221: -40
$WFXArry[9][19] = 
$WFXArry[10][0] = 1073
$WFXArry[10][1] = ONJOB:15:47
$WFXArry[10][2] = 3
$WFXArry[10][3] = 2
$WFXArry[10][4] =  
$WFXArry[10][5] = 2
$WFXArry[10][6] = AI - WALTER
$WFXArry[10][7] = ORR
$WFXArry[10][8] = 
$WFXArry[10][9] = 
$WFXArry[10][10] = 
$WFXArry[10][11] = 
$WFXArry[10][12] = 
$WFXArry[10][13] = 08:00-19:00
$WFXArry[10][14] =   4:  3
$WFXArry[10][15] =   42:  57
$WFXArry[10][16] =   99
$WFXArry[10][17] =  120
$WFXArry[10][18] =  600: 200: -19
$WFXArry[10][19] = 
$WFXArry[11][0] = 0309
$WFXArry[11][1] = ENROUTE:15:57
$WFXArry[11][2] = 2
$WFXArry[11][3] = 2
$WFXArry[11][4] =  
$WFXArry[11][5] = 1
$WFXArry[11][6] = BI - BRIAN
$WFXArry[11][7] = PAINTER
$WFXArry[11][8] = 
$WFXArry[11][9] = 
$WFXArry[11][10] = 
$WFXArry[11][11] = 
$WFXArry[11][12] = 
$WFXArry[11][13] = 08:00-19:00
$WFXArry[11][14] =   1:  3
$WFXArry[11][15] =   26:  72
$WFXArry[11][16] =   98
$WFXArry[11][17] =  120
$WFXArry[11][18] =  600: 130:  49
$WFXArry[11][19] = 
$WFXArry[12][0] = 0777
$WFXArry[12][1] = ONJOB:15:59
$WFXArry[12][2] = 3
$WFXArry[12][3] = 2
$WFXArry[12][4] =  
$WFXArry[12][5] = 1
$WFXArry[12][6] = BT - JAMES
$WFXArry[12][7] = GONZALEZ
$WFXArry[12][8] = 
$WFXArry[12][9] = 
$WFXArry[12][10] = 
$WFXArry[12][11] = 
$WFXArry[12][12] = 
$WFXArry[12][13] = 08:00-19:00
$WFXArry[12][14] =   3:  4
$WFXArry[12][15] =   35:  66
$WFXArry[12][16] =  101
$WFXArry[12][17] =  120
$WFXArry[12][18] =  600: 175:   3
$WFXArry[12][19] = 
$WFXArry[13][0] = 9655
$WFXArry[13][1] = ENROUTE:15:57
$WFXArry[13][2] = 3
$WFXArry[13][3] = 1
$WFXArry[13][4] =  
$WFXArry[13][5] = 1
$WFXArry[13][6] = BI - KASEN
$WFXArry[13][7] = HERBERT
$WFXArry[13][8] = 
$WFXArry[13][9] = 
$WFXArry[13][10] = 
$WFXArry[13][11] = 
$WFXArry[13][12] = 
$WFXArry[13][13] = 08:00-19:00
$WFXArry[13][14] =   7: 16
$WFXArry[13][15] =   37:  80
$WFXArry[13][16] =  117
$WFXArry[13][17] =  120
$WFXArry[13][18] =  600: 201: -20
$WFXArry[13][19] = 
$WFXArry[14][0] = 1021
$WFXArry[14][1] = ENROUTE:15:52
$WFXArry[14][2] = 3
$WFXArry[14][3] = 2
$WFXArry[14][4] =  
$WFXArry[14][5] = 1
$WFXArry[14][6] = AI - RICKY
$WFXArry[14][7] = FORTUNE
$WFXArry[14][8] = 
$WFXArry[14][9] = 
$WFXArry[14][10] = 
$WFXArry[14][11] = 
$WFXArry[14][12] = 
$WFXArry[14][13] = 08:00-19:00
$WFXArry[14][14] =   2:  4
$WFXArry[14][15] =   36:  91
$WFXArry[14][16] =  127
$WFXArry[14][17] =  120
$WFXArry[14][18] =  600: 180:   1
$WFXArry[14][19] = 
$WFXArry[15][0] = 0109
$WFXArry[15][1] = ONJOB:15:50
$WFXArry[15][2] = 3
$WFXArry[15][3] = 2
$WFXArry[15][4] =  
$WFXArry[15][5] =  
$WFXArry[15][6] = BI - JACOB
$WFXArry[15][7] = LARSON
$WFXArry[15][8] = 
$WFXArry[15][9] = 
$WFXArry[15][10] = 
$WFXArry[15][11] = 
$WFXArry[15][12] = 
$WFXArry[15][13] = 08:00-19:00
$WFXArry[15][14] =   8: 13
$WFXArry[15][15] =   42:  75
$WFXArry[15][16] =  117
$WFXArry[15][17] =  120
$WFXArry[15][18] =  600: 200: -19
$WFXArry[15][19] = 
$WFXArry[16][0] = 0506
$WFXArry[16][1] = ONJOB:14:50
$WFXArry[16][2] = 3
$WFXArry[16][3] = 1
$WFXArry[16][4] =  
$WFXArry[16][5] = 2
$WFXArry[16][6] = BI - NIKLAS
$WFXArry[16][7] = FLAHAVAN
$WFXArry[16][8] = 
$WFXArry[16][9] = 
$WFXArry[16][10] = 
$WFXArry[16][11] = 
$WFXArry[16][12] = 
$WFXArry[16][13] = 08:00-19:00
$WFXArry[16][14] =   1:  2
$WFXArry[16][15] =   50:  45
$WFXArry[16][16] =   95
$WFXArry[16][17] =  120
$WFXArry[16][18] =  600: 181:   0
$WFXArry[16][19] = 
$WFXArry[17][0] = 0704
$WFXArry[17][1] = ONJOB:15:49
$WFXArry[17][2] = 3
$WFXArry[17][3] = 2
$WFXArry[17][4] =  
$WFXArry[17][5] =  
$WFXArry[17][6] = BI - AUSTIN
$WFXArry[17][7] = FEEHERY
$WFXArry[17][8] = 
$WFXArry[17][9] = 
$WFXArry[17][10] = 
$WFXArry[17][11] = 
$WFXArry[17][12] = 
$WFXArry[17][13] = 08:00-19:00
$WFXArry[17][14] =   3:  7
$WFXArry[17][15] =   45:  91
$WFXArry[17][16] =  136
$WFXArry[17][17] =  120
$WFXArry[17][18] =  600: 214: -33
$WFXArry[17][19] = 
$WFXArry[18][0] = 0870
$WFXArry[18][1] = ONJOB:15:31
$WFXArry[18][2] = 3
$WFXArry[18][3] = 2
$WFXArry[18][4] =  
$WFXArry[18][5] = 1
$WFXArry[18][6] = BT - JOSEPH
$WFXArry[18][7] = ROSE
$WFXArry[18][8] = 
$WFXArry[18][9] = 
$WFXArry[18][10] = 
$WFXArry[18][11] = 
$WFXArry[18][12] = 
$WFXArry[18][13] = 08:00-19:00
$WFXArry[18][14] =   4:  4
$WFXArry[18][15] =   57:  60
$WFXArry[18][16] =  117
$WFXArry[18][17] =  120
$WFXArry[18][18] =  600: 256: -75
$WFXArry[18][19] = 
$WFXArry[19][0] = 0099
$WFXArry[19][1] = ONJOB:15:56
$WFXArry[19][2] = 3
$WFXArry[19][3] = 2
$WFXArry[19][4] =  
$WFXArry[19][5] =  
$WFXArry[19][6] = BT - DENNIS
$WFXArry[19][7] = NICHOLSON
$WFXArry[19][8] = 
$WFXArry[19][9] = 
$WFXArry[19][10] = 
$WFXArry[19][11] = 
$WFXArry[19][12] = 
$WFXArry[19][13] = 08:00-19:00
$WFXArry[19][14] =   3:  3
$WFXArry[19][15] =   54:  45
$WFXArry[19][16] =   99
$WFXArry[19][17] =  120
$WFXArry[19][18] =  600: 265: -86
$WFXArry[19][19] = 
$WFXArry[20][0] = 0519
$WFXArry[20][1] = ONJOB:15:29
$WFXArry[20][2] = 3
$WFXArry[20][3] = 2
$WFXArry[20][4] =  
$WFXArry[20][5] = 2
$WFXArry[20][6] = BT - JUSTIN
$WFXArry[20][7] = EDWARDS
$WFXArry[20][8] = 
$WFXArry[20][9] = 
$WFXArry[20][10] = 
$WFXArry[20][11] = 
$WFXArry[20][12] = 
$WFXArry[20][13] = 08:00-19:00
$WFXArry[20][14] =   3:  8
$WFXArry[20][15] =   51:  83
$WFXArry[20][16] =  134
$WFXArry[20][17] =  120
$WFXArry[20][18] =  600: 224: -43
$WFXArry[20][19] = 
$WFXArry[21][0] = 0508
$WFXArry[21][1] = ENROUTE:15:49
$WFXArry[21][2] = 2
$WFXArry[21][3] = 2
$WFXArry[21][4] =  
$WFXArry[21][5] = 1
$WFXArry[21][6] = BI - CALEB
$WFXArry[21][7] = FERGUSON
$WFXArry[21][8] = 
$WFXArry[21][9] = 
$WFXArry[21][10] = 
$WFXArry[21][11] = 
$WFXArry[21][12] = 
$WFXArry[21][13] = 08:00-19:00
$WFXArry[21][14] =   6: 13
$WFXArry[21][15] =   30:  67
$WFXArry[21][16] =   97
$WFXArry[21][17] =  120
$WFXArry[21][18] =  600: 163:  17
$WFXArry[21][19] = 
$WFXArry[22][0] = 0988
$WFXArry[22][1] = ONJOB:15:07
$WFXArry[22][2] = 3
$WFXArry[22][3] = 2
$WFXArry[22][4] =  
$WFXArry[22][5] = 2
$WFXArry[22][6] = AI - CORY
$WFXArry[22][7] = BROWN
$WFXArry[22][8] = 
$WFXArry[22][9] = 
$WFXArry[22][10] = 
$WFXArry[22][11] = 
$WFXArry[22][12] = 
$WFXArry[22][13] = 08:00-19:00
$WFXArry[22][14] =   3:  5
$WFXArry[22][15] =   51:  67
$WFXArry[22][16] =  118
$WFXArry[22][17] =  120
$WFXArry[22][18] =  600: 202: -21
$WFXArry[22][19] = 
$WFXArry[23][0] = 0123
$WFXArry[23][1] = ONJOB:15:44
$WFXArry[23][2] = 3
$WFXArry[23][3] = 2
$WFXArry[23][4] =  
$WFXArry[23][5] = 2
$WFXArry[23][6] = BT - PAUL
$WFXArry[23][7] = WAGNER
$WFXArry[23][8] = 
$WFXArry[23][9] = 
$WFXArry[23][10] = 
$WFXArry[23][11] = 
$WFXArry[23][12] = 
$WFXArry[23][13] = 08:00-19:00
$WFXArry[23][14] =   3:  4
$WFXArry[23][15] =   45:  50
$WFXArry[23][16] =   95
$WFXArry[23][17] =  120
$WFXArry[23][18] =  600: 209: -28
$WFXArry[23][19] = 
$WFXArry[24][0] = 0969
$WFXArry[24][1] = ONJOB:14:41
$WFXArry[24][2] = 3
$WFXArry[24][3] = 2
$WFXArry[24][4] =  
$WFXArry[24][5] = 1
$WFXArry[24][6] = BT - KEVIN
$WFXArry[24][7] = THOMPSON
$WFXArry[24][8] = 
$WFXArry[24][9] = 
$WFXArry[24][10] = 
$WFXArry[24][11] = 
$WFXArry[24][12] = 
$WFXArry[24][13] = 08:00-19:00
$WFXArry[24][14] =   2:  5
$WFXArry[24][15] =   55:  75
$WFXArry[24][16] =  130
$WFXArry[24][17] =  120
$WFXArry[24][18] =  600: 196: -15
$WFXArry[24][19] = 
$WFXArry[25][0] = 0334
$WFXArry[25][1] = ONJOB:15:33
$WFXArry[25][2] = 3
$WFXArry[25][3] = 2
$WFXArry[25][4] =  
$WFXArry[25][5] =  
$WFXArry[25][6] = AI - THOMAS
$WFXArry[25][7] = BERTHIAUME
$WFXArry[25][8] = 
$WFXArry[25][9] = 
$WFXArry[25][10] = 
$WFXArry[25][11] = 
$WFXArry[25][12] = 
$WFXArry[25][13] = 08:00-19:00
$WFXArry[25][14] =   3:  4
$WFXArry[25][15] =   45:  77
$WFXArry[25][16] =  122
$WFXArry[25][17] =  120
$WFXArry[25][18] =  600: 199: -18
$WFXArry[25][19] = 
$WFXArry[26][0] = 9656
$WFXArry[26][1] = ONJOB:16:00
$WFXArry[26][2] = 3
$WFXArry[26][3] = 2
$WFXArry[26][4] =  
$WFXArry[26][5] =  
$WFXArry[26][6] = BI- CHRISTOPHER
$WFXArry[26][7] = LYNCH
$WFXArry[26][8] = 
$WFXArry[26][9] = 
$WFXArry[26][10] = 
$WFXArry[26][11] = 
$WFXArry[26][12] = 
$WFXArry[26][13] = 08:00-19:00
$WFXArry[26][14] =   9: 13
$WFXArry[26][15] =   45:  65
$WFXArry[26][16] =  110
$WFXArry[26][17] =  120
$WFXArry[26][18] =  600: 244: -65
$WFXArry[26][19] = 
$WFXArry[27][0] = 0186
$WFXArry[27][1] = ENROUTE:15:53
$WFXArry[27][2] = 2
$WFXArry[27][3] = 2
$WFXArry[27][4] =  
$WFXArry[27][5] =  
$WFXArry[27][6] = AI - NICHOLAS
$WFXArry[27][7] = BRADY
$WFXArry[27][8] = 
$WFXArry[27][9] = 
$WFXArry[27][10] = 
$WFXArry[27][11] = 
$WFXArry[27][12] = 
$WFXArry[27][13] = 08:00-19:00
$WFXArry[27][14] =   5: 13
$WFXArry[27][15] =   27:  75
$WFXArry[27][16] =  102
$WFXArry[27][17] =  120
$WFXArry[27][18] =  600: 135:  46
$WFXArry[27][19] = 
$WFXArry[28][0] = 8023
$WFXArry[28][1] = UNK:10:06
$WFXArry[28][2] = 3
$WFXArry[28][3] = 3
$WFXArry[28][4] =  
$WFXArry[28][5] =  
$WFXArry[28][6] = PENDING CANCEL
$WFXArry[28][7] = JOBS
$WFXArry[28][8] = 
$WFXArry[28][9] = 
$WFXArry[28][10] = 
$WFXArry[28][11] = 
$WFXArry[28][12] = 
$WFXArry[28][13] = 00:15-23:45
$WFXArry[28][14] =   3:  0
$WFXArry[28][15] =   45:   0
$WFXArry[28][16] =   45
$WFXArry[28][17] =  282
$WFXArry[28][18] = 1410: 225: 241
$WFXArry[28][19] = 
$WFXArry[29][0] = 8024
$WFXArry[29][1] = UNK:12:16
$WFXArry[29][2] = 3
$WFXArry[29][3] = 3
$WFXArry[29][4] =  
$WFXArry[29][5] =  
$WFXArry[29][6] = GENERIC
$WFXArry[29][7] = PENDING CONFIRMATION
$WFXArry[29][8] = 
$WFXArry[29][9] = 
$WFXArry[29][10] = 
$WFXArry[29][11] = 
$WFXArry[29][12] = 
$WFXArry[29][13] = 00:15-23:45
$WFXArry[29][14] =   0:  0
$WFXArry[29][15] =    0:   0
$WFXArry[29][16] =    0
$WFXArry[29][17] =  282
$WFXArry[29][18] = 1410:   0: 466
$WFXArry[29][19] = 
$WFXArry[30][0] = 8025
$WFXArry[30][1] = UNK:16:35
$WFXArry[30][2] = 3
$WFXArry[30][3] = 3
$WFXArry[30][4] =  
$WFXArry[30][5] =  
$WFXArry[30][6] = GENERIC
$WFXArry[30][7] = MANUAL COURTESY CALL
$WFXArry[30][8] = 
$WFXArry[30][9] = 
$WFXArry[30][10] = 
$WFXArry[30][11] = 
$WFXArry[30][12] = 
$WFXArry[30][13] = 00:15-23:45
$WFXArry[30][14] =  50:  0
$WFXArry[30][15] =  369:   0
$WFXArry[30][16] =  369
$WFXArry[30][17] =  282
$WFXArry[30][18] = 1410:1845:-1379
$WFXArry[30][19] =
; Return Status Time Difference from when the status was placed to now, for Comparison in _TechStatusSorter()
Func _RtrnTimeDifference($hString)
    Local $hTime
    Local $mTime
    Local $NowDay =  @YEAR & "/" & @Mon & "/" & @MDay
    $hTime = StringTrimRight(StringRight($hString, 5), 3)
    $mTime = StringTrimLeft(StringRight($hString, 5), 3)
    Return _DateDiff('n', $NowDay & " " & $hTime & ":" & $mTime, _NowCalc())
EndFunc

; Sort statuses and appropriate images
Func _TechStatusSorter($WFXArry)
    Local $StrBffr
    Local $CopArr[UBound($WFXArry, 1)][UBound($WFXArry, 2)]
    Local $TempBuffer[UBound($WFXArry, 1)][UBound($WFXArry, 2)]
    Local $Marker
    Local $ItemCount
    Local $ZeroCoin
    $ItemCount = 0
    $Marker = 0
    $ZeroCoin = 0

    Local $StatArr[7]
    $StatArr[0] = "SUP"
    $StatArr[1] = "AVAIL"
    $StatArr[2] = "ENROUTE"
    $StatArr[3] = "BREAK"
    $StatArr[4] = "FUEL"
    $StatArr[5] = "TRAIN"
    $StatArr[6] = "WAR"

    For $j = 0 to UBound($WFXArry, 1) - 1
        For $k = 0 to UBound($WFXArry, 2) - 1
            $TempBuffer[$j][$k] = $WFXArry[$j][$k]
        Next
    Next

    ;filter by priority
    For $j = 0 To UBound($StatArr, 1) - 1
        For $a = 0 to UBound($WFXArry, 1) - 1
            If StringInStr($WFXArry[$a][1], $StatArr[$j]) Then
                For $b = 0 to UBound($WFXArry, 2) - 1
                    $CopArr[$Marker][$b] = $WFXArry[$a][$b]
                Next
                $Marker += 1
            EndIf
        Next
    Next


    ;_ArrayDisplay($CopArr)
    Return $CopArr
EndFunc

 

Share this post


Link to post
Share on other sites



So I just added your array data to a temp script and I added:

#include <Array.au3>

Global $WFXArry

;your data from above here

_ArrayDisplay($WFXArry)

and I am getting a ton of errors. Your data looks like it needs to be better formatted so we can help you.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

CodeTinkerer,

I agree with computergroove - there are too many errors to even begin to debug as it stands. The data looks like it comes from a csv file, so just attach the file.

If I understand your request correctly, you might find my ArrayMultiColSort UDF of use.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thank you both for your feedback, here is the array corrected without errors:

Local $WFXTextArray[8][20]
$WFXTextArray[0][0] = "30"
$WFXTextArray[0][1] = "20"
$WFXTextArray[0][2] = "Tech|Status|AD|Equip|||First Name|Last Name|Can Do"
$WFXTextArray[0][3] = "0"
$WFXTextArray[0][4] = ""
$WFXTextArray[0][5] = ""
$WFXTextArray[0][6] = ""
$WFXTextArray[0][7] = ""
$WFXTextArray[0][8] = ""
$WFXTextArray[0][9] = ""
$WFXTextArray[0][10] = ""
$WFXTextArray[0][11] = ""
$WFXTextArray[0][12] = ""
$WFXTextArray[0][13] = ""
$WFXTextArray[0][14] = ""
$WFXTextArray[0][15] = ""
$WFXTextArray[0][16] = ""
$WFXTextArray[0][17] = ""
$WFXTextArray[0][18] = ""
$WFXTextArray[0][19] = ""
$WFXTextArray[1][0] = "0648"
$WFXTextArray[1][1] = "AVAIL:21:15"
$WFXTextArray[1][2] = "1"
$WFXTextArray[1][3] = "2"
$WFXTextArray[1][4] = ""
$WFXTextArray[1][5] = "1"
$WFXTextArray[1][6] = "BT - DANE"
$WFXTextArray[1][7] = "ENTZMINGER"
$WFXTextArray[1][8] = ""
$WFXTextArray[1][9] = ""
$WFXTextArray[1][10] = ""
$WFXTextArray[1][11] = ""
$WFXTextArray[1][12] = ""
$WFXTextArray[1][13] = "08:00-19:00"
$WFXTextArray[1][14] = "2:  7"
$WFXTextArray[1][15] = "30:  67"
$WFXTextArray[1][16] = "97"
$WFXTextArray[1][17] = "120"
$WFXTextArray[1][18] = "600: 116:  64"
$WFXTextArray[1][19] = ""
$WFXTextArray[2][0] = "0132"
$WFXTextArray[2][1] = "AVAIL:21:10"
$WFXTextArray[2][2] = "3"
$WFXTextArray[2][3] = "2"
$WFXTextArray[2][4] = ""
$WFXTextArray[2][5] = "1"
$WFXTextArray[2][6] = "BI - DEVIN"
$WFXTextArray[2][7] = "STOKES"
$WFXTextArray[2][8] = ""
$WFXTextArray[2][9] = ""
$WFXTextArray[2][10] = ""
$WFXTextArray[2][11] = ""
$WFXTextArray[2][12] = ""
$WFXTextArray[2][13] = "10:00-19:00"
$WFXTextArray[2][14] =   "8:  9"
$WFXTextArray[2][15] =  "40:  55"
$WFXTextArray[2][16] =   "95"
$WFXTextArray[2][17] =   "96"
$WFXTextArray[2][18] =  "480: 184:  -5"
$WFXTextArray[2][19] = ""
$WFXTextArray[3][0] = "0205"
$WFXTextArray[3][1] = "AVAIL:21:00"
$WFXTextArray[3][2] = "3"
$WFXTextArray[3][3] = "2"
$WFXTextArray[3][4] = ""
$WFXTextArray[3][5] = "1"
$WFXTextArray[3][6] = "BS - DAVID"
$WFXTextArray[3][7] = "EDGE"
$WFXTextArray[3][8] = ""
$WFXTextArray[3][9] = ""
$WFXTextArray[3][10] = ""
$WFXTextArray[3][11] = ""
$WFXTextArray[3][12] = ""
$WFXTextArray[3][13] = "10:00-19:00"
$WFXTextArray[3][14] =   "2:  3"
$WFXTextArray[3][15] =   "30:  45"
$WFXTextArray[3][16] =   "75"
$WFXTextArray[3][17] =   "96"
$WFXTextArray[3][18] =  "480: 109:  71"
$WFXTextArray[3][19] = ""
$WFXTextArray[4][0] = "0997"
$WFXTextArray[4][1] = "AVAIL:21:30"
$WFXTextArray[4][2] = "2"
$WFXTextArray[4][3] = "2"
$WFXTextArray[4][4] = ""
$WFXTextArray[4][5] = "1"
$WFXTextArray[4][6] = "BT - CODY"
$WFXTextArray[4][7] = "WETTERLING"
$WFXTextArray[4][8] = ""
$WFXTextArray[4][9] = ""
$WFXTextArray[4][10] = ""
$WFXTextArray[4][11] = ""
$WFXTextArray[4][12] = ""
$WFXTextArray[4][13] = "08:00-22:00"
$WFXTextArray[4][14] =   "5:  6"
$WFXTextArray[4][15] =   "59:  70"
$WFXTextArray[4][16] =  "129"
$WFXTextArray[4][17] =  "156"
$WFXTextArray[4][18] =  "780: 302:  58"
$WFXTextArray[4][19] = ""
$WFXTextArray[5][0] = "0913"
$WFXTextArray[5][1] = "ENROUTE:21:05"
$WFXTextArray[5][2] = "1"
$WFXTextArray[5][3] = "2"
$WFXTextArray[5][4] = ""
$WFXTextArray[5][5] = "1"
$WFXTextArray[5][6] = "AI - PETER"
$WFXTextArray[5][7] = "HARRISON"
$WFXTextArray[5][8] = ""
$WFXTextArray[5][9] = ""
$WFXTextArray[5][10] = ""
$WFXTextArray[5][11] = ""
$WFXTextArray[5][12] = ""
$WFXTextArray[5][13] = "08:00-19:00"
$WFXTextArray[5][14] =   "1:  5"
$WFXTextArray[5][15] =   "25:  55"
$WFXTextArray[5][16] =   "80"
$WFXTextArray[5][17] =  "120"
$WFXTextArray[5][18] =  "600:  92:  88"
$WFXTextArray[5][19] = ""
$WFXTextArray[6][0] = "0001"
$WFXTextArray[6][1] = "ENROUTE::21:21"
$WFXTextArray[6][2] = "2"
$WFXTextArray[6][3] = "2"
$WFXTextArray[6][4] = ""
$WFXTextArray[6][5] = "1"
$WFXTextArray[6][6] = "AI - JAMES"
$WFXTextArray[6][7] = "FARACE"
$WFXTextArray[6][8] = ""
$WFXTextArray[6][9] = ""
$WFXTextArray[6][10] = ""
$WFXTextArray[6][11] = ""
$WFXTextArray[6][12] = ""
$WFXTextArray[6][13] = "08:00-19:00"
$WFXTextArray[6][14] =   "2:  3"
$WFXTextArray[6][15] =   "26:  66"
$WFXTextArray[6][16] =   "92"
$WFXTextArray[6][17] =  "120"
$WFXTextArray[6][18] =  "600:  98:  82"
$WFXTextArray[6][19] = ""
$WFXTextArray[7][0] = "0533"
$WFXTextArray[7][1] = "SUPPROJECT:21:03"
$WFXTextArray[7][2] = "2"
$WFXTextArray[7][3] = "2"
$WFXTextArray[7][4] = ""
$WFXTextArray[7][5] = "1"
$WFXTextArray[7][6] = "BT - STEPHEN"
$WFXTextArray[7][7] = "SCHMITZ"
$WFXTextArray[7][8] = ""
$WFXTextArray[7][9] = ""
$WFXTextArray[7][10] = ""
$WFXTextArray[7][11] = ""
$WFXTextArray[7][12] = ""
$WFXTextArray[7][13] = "08:00-19:00"
$WFXTextArray[7][14] =   "8:  3"
$WFXTextArray[7][15] =   "62:  74"
$WFXTextArray[7][16] =  "136"
$WFXTextArray[7][17] =  "156"
$WFXTextArray[7][18] =  "780: 276:  82"
$WFXTextArray[7][19] = ""

Also I did not originally stat that this is a dummy array from the live data. Normally the information is pulled directly from reading a 3rd party applications Sys32ListView Control into an array.

 

   Local $WFXMain = WinToProcComp('Workforce_Management.exe', 'Workforce Management - Wisconsin')
   Local $WFXList = ConTrolGetHandle($WFXMain, "", '[CLASS:SysListView32; INSTANCE:1]')
   Local $WFXTextArray = _GUICtrlListView_CreateArray($WFXList, '|')
Edited by CodeTinkerer

Share this post


Link to post
Share on other sites

I Managed to get the desired outcome with this setup:

; Return Status Time Difference from when the status was placed to now, for Comparison in _TechStatusSorter()
Func _RtrnTimeDifference($hString)
    Local $hTime
    Local $mTime
    Local $NowDay =  @YEAR & "/" & @Mon & "/" & @MDay
    $hTime = StringTrimRight(StringRight($hString, 5), 3)
    $mTime = StringTrimLeft(StringRight($hString, 5), 3)
    Return _DateDiff('n', $NowDay & " " & $hTime & ":" & $mTime, _NowCalc())
EndFunc

; Sort statuses and appropriate images
Func _TechStatusSorter($WFXArry)
    Local $StrBffr
    Local $CopArr[UBound($WFXArry, 1)][UBound($WFXArry, 2)]
    Local $TempBuffer[UBound($WFXArry, 1)][UBound($WFXArry, 2)]
    Local $Marker
    Local $TimeSet
    Local $StatArr[8]
    $StatArr[0] = "SUP"
    $StatArr[1] = "AVAIL"
    $StatArr[2] = "ENROUTE"
    $StatArr[3] = "BREAK"
    $StatArr[4] = "FUEL"
    $StatArr[5] = "TRAIN"
    $StatArr[6] = "WAR"
    $StatArr[7] = "TRUCKMAINT"
    ;filter by priority
    For $j = 0 To UBound($StatArr, 1) - 1
        For $a = 0 to UBound($WFXArry, 1) - 1
            If StringInStr($WFXArry[$a][1], $StatArr[$j]) Then
                For $b = 0 to UBound($WFXArry, 2) - 1
                    If $b = 8 Then
                    $CopArr[$Marker][$b] = _RtrnTimeDifference($WFXArry[$A][1])
                    Else
                    $CopArr[$Marker][$b] = $WFXArry[$a][$b]
                    Endif
                Next
                $Marker += 1
            EndIf
        Next
    Next
    $Marker = 0
    ;_ArrayDisplay($CopArr)
    Local $ab, $sb, $tB, $bb, $trb, $wb, $eb, $fb
    Local $StatusBank[UBound($CopArr, 1)]

    For $g = 0 to UBound($CopArr, 1) - 1
        $StatusBank[$g] = $CopArr[$g][8]
    Next

    _ArraySort($StatusBank)
    For $ix = 0 to UBound($StatusBank, 1) - 1
        For $Ordos = 0 to UBound($CopArr, 1) - 1
            If $StatusBank[$ix] = $CopArr[$Ordos][8] Then
                For $Fin = 0 to UBound($CopArr, 2) - 1
                    $TempBuffer[$Marker][$fin] = $CopArr[$Ordos][$Fin]
                Next
                $Marker += 1
            EndIf
        Next
    Next
    $Marker = 0
    For $q = 0 to UBound($StatArr, 1) - 1
        For $uu = 0 to Ubound($TempBuffer, 1) - 1
            If StringInStr($TempBuffer[$uu][1], $StatArr[$q]) Then
                For $w = 0 to UBound($TempBuffer, 2) - 1
                    $CopArr[$Marker][$w] = $TempBuffer[$uu][$w]
                Next
                $Marker += 1

            EndIf
        Next
    Next
    Return $CopArr
EndFunc

$SortedStats = _TechStatusSorter($WFXTextArray)
    For $x = 0 to UBound($SortedStats, 1) - 1
        _GUICtrlListView_AddItem($LstID, $SortedStats[$x][0], $x)
        _GUICtrlListView_AddSubItem($LstID, $x, $SortedStats[$x][1], 1, 1)
        _GUICtrlListView_AddSubItem($LstID, $x, $SortedStats[$x][6], 2, 2)
        _GUICtrlListView_AddSubItem($LstID, $x, $SortedStats[$x][7], 3, 3)
    Next

I guess my next question would be: Can this be any more efficient/simplified?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now