Halloin my form i have an action button and the click makes the following lotusscript code:
Sub Click(Source As Button)
Dim agent As NotesAgent
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = ws.currentdocument
Dim s As New NotesSession
Dim db As Notesdatabase
Dim doc As Notesdocument
Set db=s.currentdatabase
Set doc = db.CreateDocument
doc.Form = “Berichtsstatus”
doc.Art = “HP”
doc.Nr = uidoc.FieldGettext(“Nr”)
'---------------
Set agent = db.GetAgent(“MyAgent”)
'Messagebox doc.NoteID
Call agent.Run(doc.NoteID)
End Sub
This is the formula agent:
FIELD Anm:=@If(VBNr!=“”;@DbLookup(“”:“”;“”:“”;“Anmerk”;VBNr;4);“”);
SELECT @All
The problem is in the last line of the ‘click’: