Hi Axel!
Danke, habs jetzt im LS zum Laufen gebracht. Hier der Code:
Sub Exiting(Source As Field)
' This code has been written because it's not possible in Formula Language
Dim workspace As New NotesUIWorkspace
Set doc1 = workspace.CurrentDocument
Set doc1 = workspace.EditDocument( True )'go in Edit mode
Dim ws As New NotesUIWorkspace
Dim doc As NotesDocument
Set doc = ws.CurrentDocument.Document 'Shortcut
' Get the ProblemTypeText array. (0) ist the needed entry
aProblemTypeText = Evaluate ( {@DbLookup("":"NoCache";"" ; "ProblemType Handler\\By Problem Type" ; iq_ProblemType ; "pthProblemTypeText" )}, doc )
sProblemTypeText = aProblemTypeText (0) ' get the value by accessing the array
' print out
Call doc1.FieldSetText("Testfeld",sProblemTypeText ) 'assign to that person
Msgbox sProblemTypeText
End Sub
Hier noch was interessantes aus der IBM Info:
However, there is one example of where using an Evaluate statement can actually make your code run faster -- a lot faster: using an Evaluate ({@Dblookup...}) in place of the NotesDatabase method GetAllDocumentsByKey.
Greez
Manuel