Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
//@Top5 (Place this formula in the mach number group header it can be suppressed)
WhilePrintingRecords;
Shared NumberVar Array Value;
Redim Value [5];
Shared StringVar Array Reason;
Redim Reason [5];
(
If {Mytable.downtmaint} <> 0 Then
(
Value[1]:= {MyTable.downtmaint};
Reason[1] := 'downtmaint'
)
);
(
If {Mytable.downtauto} <> 0 Then
If {Mytable.downtauto} < Value[1] Then
(
Value[2] := {Mytable.downtauto};
Reason[2] := 'downtauto'
)
Else
(
Value[2] := Value[1];
Reason[2] := Reason[1];
Value[1] := {Mytable.downtauto};
Reason[1] := 'downtauto'
)
);
(
If {Mytable.downtsetup} <> 0 Then
If {Mytable.downtsetup} < Value[2] Then
(
Value[3] := {Mytable.downtsetup};
Reason[3] := 'downtsetup'
)
Else If {Mytable.downtsetup} < Value[1] Then
(
Value[3] := Value[2];
Reason[3] := Reason[2];
Value[2] := {Mytable.downtsetup};
Reason[2] := 'downtsetup'
)
Else
(
Value[3] := Value[2];
Reason[3] := Reason[2];
Value[2] := Value[1];
Reason[2] := Reason[1];
Value[1] := {Mytable.downtsetup};
Reason[1] := 'downtsetup'
)
);
(
If {Mytable.downtclnmach} <> 0 Then
If {Mytable.downtclnmach} < Value[3] Then
(
Value[4] := {Mytable.downtclnmach};
Reason[4] := 'downtclnmach'
)
Else If {Mytable.downtclnmach} < Value[2] Then
(
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := {Mytable.downtclnmach;
Reason[3] := 'downtclnmach'
)
Else If {Mytable.downtclnmach} < Value[1] Then
(
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := Value[2];
Reason[3] := Reason[2];
Value[2] := {Mytable.downtclnmach};
Reason[2] := 'downtclnmach'
)
Else
(
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := Value[2];
Reason[3] := Reason[2];
Value[2] := Value[1];
Reason[2] := Reason[1];
Value[1] := {Mytable.downtclnmach};
Reason[1] := 'downtclnmach'
)
);
(
If {Mytable.downtclntool} <> 0 Then
If {Mytable.downtclntool} < Value[4] Then
(
Value[5] := {Mytable.downtclntool};
Reason[4] := 'downtclntool'
)
Else If {Mytable.downtclntool} < Value[3] Then
(
Value[5] := Value[4];
Reason[5] := Reason[4];
Value[4] := {Mytable.downtclntool};
Reason[4] := 'downtclntool'
)
Else If {Mytable.downtclntool} < Value[2] Then
(
Value[5] := Value[4];
Reason[5] := Reason[4];
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := {Mytable.downtclntool};
Reason[3] := 'downtclntool'
)
Else If {Mytable.downtclntool} < Value[1] Then
(
Value[5] := Value[4];
Reason[5] := Reason[4];
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := Value[2];
Reason[3] := Reason[2];
Value[2] := {Mytable.downtclntool};
Reason[2] := 'downtclntool'
)
Else
(
Value[5] := Value[4];
Reason[5] := Reason[4];
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := Value[2];
Reason[3] := Reason[2];
Value[2] := Value[1];
Reason[2] := Reason[1];
Value[1] := {Mytable.downtclntool};
Reason[1] := 'downtclntool'
)
);
//<----------------Repeat this block for all other reasons---------------------->
(
If {Mytable.downttoolrep} <> 0 and {Mytable.downttoolrep} > Value[5] Then
If {Mytable.downttoolrep} < Value[4] Then
(
Value[5] := {Mytable.downttoolrep};
Reason[5] := 'downttoolrep'
)
Else If {Mytable.downttoolrep} < Value[3] Then
(
Value[5] := Value[4];
Reason[5] := Reason[4];
Value[4] := {Mytable.downttoolrep};
Reason[4] := 'downttoolrep'
)
Else If {Mytable.downttoolrep} < Value[2] Then
(
Value[5] := Value[4];
Reason[5] := Reason[4];
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := {Mytable.downttoolrep};
Reason[3] := 'downttoolrep'
)
Else If {Mytable.downttoolrep} < Value[1] Then
(
Value[5] := Value[4];
Reason[5] := Reason[4];
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := Value[2];
Reason[3] := Reason[2];
Value[2] := {Mytable.downttoolrep};
Reason[2] := 'downttoolrep'
)
Else
(
Value[5] := Value[4];
Reason[5] := Reason[4];
Value[4] := Value[3];
Reason[4] := Reason[3];
Value[3] := Value[2];
Reason[3] := Reason[2];
Value[2] := Value[1];
Reason[2] := Reason[1];
Value[1] := {Mytable.downttoolrep};
Reason[1] := 'downttoolrep'
)
);
//<----------------End of Block---------------------------------->
//@Reason1
EvaluateAfter({@Top5});
Shared StringVar Array Reason;
Reason[1]
//@Value1
WhilePrintingRecords;
Shared NumberVar Array Value;
Value[1]