if ((valFor(VAL_SEQUENCE,r) = 'AND') or (valFor(VAL_SEQUENCE,r) = '')) and (AdminTime > -1) and (EndCheck = false) then
          begin
            //if (CompSch = '') and (LastSch <> '') and (Aschedule <> '') then CompSch := LastSch;
            if (ASchedule <> '') and (CompSch <> '') and (RowCheck = False) then ASchedule := ASchedule + ';' + CompSch;
            if (ASchedule = '') and (CompSch <> '') and (RowCheck = False) then ASchedule := ';' + CompSch;
          end
        else if (ValFor(VAL_SEQUENCE, r) = 'THEN') and (EndCheck = False) then
          begin
           // if (CompSch = '') and (LastSch <> '') and (Aschedule <> '') then CompSch := LastSch;
            if (ASchedule <> '') and (CompSch <> '') and (RowCheck = False) then ASchedule := ASchedule + ';' + CompSch;
            if (ASchedule = '') and (CompSch <> '') and (RowCheck = False) then ASchedule := ';' + CompSch;
            EndCheck := True;
          End
