Hallo liebe LN Gemeinde,
wieder schlage ich mich mit einem kleinen Problem und hoffe auf Hilfe.
Ich habe 2 Funktionen in meiner Library die ich wiederverwende.
Bei der 2 . allerdings kert das Programm wird nach Abbarbeitung der 2 Funktion nicht mehr zum Hauptprogramm
zurück.
1.
| Function PruefeBearbeiterVonID (IDENT As String) As String |
| PruefeBearbeiterVonID = "" |
| Dim session As New NotesSession |
| Dim view As NotesView |
| Dim dc As NotesDocumentCollection |
| Dim db As NotesDatabase |
| Dim Doc As NotesDocument |
| Set db = session.CurrentDatabase |
| Set view = db.GetView( "(InternIdent)" ) |
| Set dc = view.GetAllDocumentsByKey(IDENT, True) |
| Set doc = dc.getfirstdocument |
| While Not (doc Is Nothing) |
| If doc.e4fldInitiator(0) <> "" Then |
| PruefeBearbeiterVonID = doc.e4fldInitiator(0) |
| End If |
| Set doc = dc.GetNextDocument(doc) |
| Wend |
| |
| End Function |
2.
| Function SetzeIdAufInitiator (IDENT As String, Initiator As String) As Integer |
| Dim Dokumentzaehler As Integer |
| Dim view As NotesView |
| Dim Session As New NotesSession |
| Dim dc As NotesDocumentCollection |
| Dim db As NotesDatabase |
| Set db = session.CurrentDatabase |
| Set view = db.GetView( "(InternIdent)" ) |
| Set dc = view.GetAllDocumentsByKey(IDENT, True) |
| Set doc = dc.getfirstdocument |
| |
| While Not (doc Is Nothing) |
| |
| If doc.e4fldInitiator(0)<>Initiator Then |
| Call doc.ReplaceItemValue( "e4fldInitiator", Cstr(Initiator) ) |
| Call doc.ReplaceItemValue("e4fldStatus","Neu Zugewiesen") |
| Call doc.ReplaceItemValue( "e4fldWiedervorlagedatum", "" ) |
| Call doc.ReplaceItemValue("e4fldNeuZugewiesen","") |
| Dokumentzaehler = Dokumentzaehler + 1 |
| End If |
| |
| Call doc.Save( True, True ) |
| |
| Set doc = dc.GetNextDocument(doc) |
| Wend |
| End |
| SetzeIdAufInitiator = Dokumentzaehler |
| End Function |
So rufe ich die 2. Funktion auf, die 2 Funktion wird abgearbeitet, die Messagebox wird aber nicht mehr aufgerufen.
| Dim Key As String |
| Dim Session As New NotesSession |
| Set session = New notessession |
| Set db=session.currentdatabase |
| Set Collection=db.UnprocessedDocuments |
| Set doc=Collection.GetFirstDocument |
| key = doc.e4fldIdentnummer(0) |
| |
| Dim ws As New NotesUIWorkspace |
| Dim result As Variant |
| With session.CurrentDatabase |
| result = ws.PickListStrings(3,1,.server,.FilePath,"e4vwWeiterleitung","Titel","An wen möchten Sie den Identnummernordner " + key + " delegieren ?",1) |
| End With |
| |
| *** |
| |
| |
| Messagebox ( Ergebnis & " Dokumente wurden delegiert ") |
Was habe ich übersehen ?
Vielen Dank für die Hilfe
Don Pasquale