Hallo zusammen,
ich habe mir einen Beispielcode runter geladen aus der Sandbox. Leider steig ich nicht so ganz durch. Der Agent wird über einen Button im WEB aufgerufen.
Die entstehende HTML Seite wird in der Funktion BuildForm erstellt.
Kann mir jemand allgemein erklären was da gemacht wird??? Danke...
Dim windowTitle As String
Dim DB As NotesDatabase
Dim agentName As String
Dim Session As New NotesSession
Dim nabDB As NotesDatabase
Dim View As NotesView, ViewDoc As NotesDocument
Dim Doc As NotesDocument, noteName As NotesName
Dim nabName As String
Dim nabView As String
windowTitle = "Titel"
agentNames = Evaluate({@explode("} & Session.currentAgent.Name & {"; "|")} )
agentName = Trim(agentNames( Ubound(agentNames) ))
nabName = "names.nsf"
nabView = "($People)"
Set DB = Session.CurrentDatabase
Set Doc = Session.DocumentContext
If Doc Is Nothing Then
' For testing only.
Set Doc = DB.CreateDocument
doc.query_string = "OpenAgent&data"
End If
If Instr( Lcase(Doc.Query_String(0)), "&data") Then
' read the view and product a comma separated file
Print "Content-Type: text/plain" ' needed to make this a plain file
'Open the NAB
Set nabDB = Session.GetDatabase( DB.Server, nabName)
Set View = nabDB.GetView( nabView )
' Output the header
Print "Name,lastName,returnValue"
Set ViewDoc = View.GetFirstDocument
While Not ViewDoc Is Nothing
Set noteName = New NotesName( ViewDoc.Fullname(0) )
Print noteName.common & "," & Ucase(ViewDoc.Lastname(0)) & "," & ViewDoc.Fullname(0)
Set ViewDoc = View.GetNextDocument( ViewDoc )
Wend
Else
Call BuildForm
End If