Hi,maybe someone can give me a tip.
We have a Call tracking system with a form. On that form there is a field “status”.
Also I set up a Escalation profile document for each status. In this profile document i added a filled for days, when the status should escalate.
In an agent i count the days since the status of the call tracking system was last changed.
If the amount of these days is >= the days of my escalation document an email will send.
That works perfect for me, but one this is driving me crazy.
How can I exclude weekend days in this compare of the days?
Any help or tip would be great.
Regards
Andi
Here is my Agent:
Sub Initialize
Dim Collection As NotesViewEntryCollection
Dim View As NotesView
Dim ViewEntry As NotesViewEntry
On Error Resume Next
Set db_textbaustein = New NotesDatabase( "XXX", "XXX.nsf" )
Set view_sondereskalation = db_textbaustein.GetView( "XXX" )
Set view_eskalation = db_textbaustein.GetView( "XXX" )
Set db = New NotesDatabase( "YYY", "YYY.nsf" )
Set view = db.GetView( "XXX" )
Set Collection = View.AllEntries
DBName = "Call Tracking System"
For i = 1 To Collection.Count
Set ViewEntry = Collection.GetNthEntry(i)
Set doc = ViewEntry.Document
Status = doc.Status_neu(0)
Callnummer = doc.repnummer(0)
Call Eskalationsprofile
Next
End Sub
Sub Eskalationsprofile
Dim Doc_sondereskalation As NotesDocument
Dim collection_sondereskalation As NotesDocumentCollection
Dim Doc_eskalation As NotesDocument
Dim collection_eskalation As NotesDocumentCollection
Dim item As NotesItem
normaleEskalation:
Set Collection_eskalation = View_eskalation.getalldocumentsbykey(Status)
For i = 1 To collection_eskalation.Count
Set doc_eskalation = collection_eskalation.GetNthDocument(i)
If doc_eskalation.Status(0) = Status Then
Gruppe = doc_eskalation.Gruppe
Forall x In doc_eskalation.Gruppe
If x = doc.Gruppe(0) Then
Forall y In doc_eskalation.Datenbank
If y = DBName Then
If doc_eskalation.eskalation_deaktivieren(0) <> "Ja" Then
If doc.statushistory(0) = "" Then
Letzte_statusaenderung = doc.Created(0)
Else
Letzte_statusaenderung = (Datevalue(Date$) - Datevalue(Left$(Right$(doc.statushistory(0),13),10)))
End If
Eskalationszeitpunkt = doc_eskalation.Eskalationszeitpunkt(0)
If Letzte_statusaenderung >= Eskalationszeitpunkt Then 'here it should exclude the weekend days
Mail_Teamleader = doc_eskalation.nachricht_teamleader(0)
Mail_akt_bearbeiter = doc_eskalation.nachricht_akt_bearbeiter(0)
Call Mail_Eskalation
End If
End If
End If
End Forall
End If
End Forall
End If
Next
Jump:
End Subone can give me a tip