This is what I did, and it does not work.
Code:
Function Filter()
$iIncludeThis=1
$Flag = "True"
$Count = 0
For $count2 = 0 To UBound($c)
$Comp = $C[$count2]
$Re = $BY[$count2]
$Err = $E[$Count2]
If $ServSort.Text<>"None" AND $ServSort.Text<>$Comp $iIncludeThis=0 EndIf
If $ReportSort.Text<>"None" AND $ReportSort.Text<>$Rep $iIncludeThis=0 EndIf
If $ErrorSort.Text<>"None" AND $ErrorSort.Text<>$ERR $iIncludeThis=0 EndIf
If $iIncludeThis
ReDIM Preserve $D1[$Count]
ReDIM Preserve $T1[$Count]
ReDIM Preserve $E1[$Count]
ReDIM Preserve $C1[$count]
ReDIM Preserve $TE1[$Count]
ReDIM Preserve $BY1[$count]
$D1[$Count] = $D[$Count2]
$T1[$Count] = $T[$Count2]
$E1[$Count] = $E[$Count2]
$C1[$Count] = $C[$Count2]
$TE1[$Count] = $TE[$Count2]
$By1[$Count] = $BY[$Count2]
$count = $count + 1
EndIf
Next
$Count = 0
Update2 ()
EndFunction
My belief is that I will have to run 3 "subroutines" within the function referencing the prior array each time. Do you concur...
I.E.
ServSort Array filtered from Main Array
ReportSort Array filtered from ServSort Array
ErrorSort Array filtered from ReportSort Array
This would then give me my final array that I would then display in UPDATE2()
Like this...
Code:
$iIncludeThis=1
$Flag = "True"
$Count = 0
For $count2 = 0 To UBound($c)
$Comp = $C[$count2]
$Re = $BY[$count2]
$Err = $E[$Count2]
If $ServSort.Text<>"None" AND $ServSort.Text<>$Comp $iIncludeThis=0 EndIf
If $iIncludeThis
ReDIM Preserve $D1[$Count]
ReDIM Preserve $T1[$Count]
ReDIM Preserve $E1[$Count]
ReDIM Preserve $C1[$count]
ReDIM Preserve $TE1[$Count]
ReDIM Preserve $BY1[$count]
$D1[$Count] = $D[$Count2]
$T1[$Count] = $T[$Count2]
$E1[$Count] = $E[$Count2]
$C1[$Count] = $C[$Count2]
$TE1[$Count] = $TE[$Count2]
$By1[$Count] = $BY[$Count2]
$count = $count + 1
EndIf
Next
$Count = 0
For $count2 = 0 To UBound($c1)
$Comp = $C1[$count2]
$Re = $BY1[$count2]
$Err = $E1[$Count2]
If $ReportSort.Text<>"None" AND $ReportSort.Text<>$Rep $iIncludeThis=0 EndIf
If $iIncludeThis
ReDIM Preserve $D2[$Count]
ReDIM Preserve $T2[$Count]
ReDIM Preserve $E2[$Count]
ReDIM Preserve $C2[$count]
ReDIM Preserve $TE2[$Count]
ReDIM Preserve $BY2[$count]
$D2[$Count] = $D1[$Count2]
$T2[$Count] = $T1[$Count2]
$E2[$Count] = $E1[$Count2]
$C2[$Count] = $C1[$Count2]
$TE2[$Count] = $TE1[$Count2]
$By2[$Count] = $BY1[$Count2]
$count = $count + 1
EndIf
Next
$Count = 0
For $count2 = 0 To UBound($c1)
$Comp = $C2[$count2]
$Re = $BY2[$count2]
$Err = $E2[$Count2]
If $ErrorSort.Text<>"None" AND $ErrorSort.Text<>$ERR $iIncludeThis=0 EndIf
If $iIncludeThis
ReDIM Preserve $D3[$Count]
ReDIM Preserve $T3[$Count]
ReDIM Preserve $E3[$Count]
ReDIM Preserve $C3[$count]
ReDIM Preserve $TE3[$Count]
ReDIM Preserve $BY3[$count]
$D3[$Count] = $D2[$Count2]
$T3[$Count] = $T2[$Count2]
$E3[$Count] = $E2[$Count2]
$C3[$Count] = $C2[$Count2]
$TE3[$Count] = $TE2[$Count2]
$By3[$Count] = $BY2[$Count2]
$count = $count + 1
EndIf
Next
Update2 ()
EndFunction
I believe I would have to add some code to account for the "none" to populate the array's with all entries so as to follow the flow all the way through.
Edited by Gargoyle (2005-05-20 07:03 PM)
_________________________
Today is the tomorrow you worried about yesterday.