Das Notes Forum
Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: lio am 20.03.03 - 10:00:08
-
hallo,
wie komme ich an den namen (form) des aktuellen dokuments (currentdocument) in LS
da muss es doch irgendeine property geben?
geht es irgendwie über die notesform-class? aber wie bekomme ich das currentdocument dort "hinein"???
help....
-
einmal so..(sollte es schon in R4 geben, oder?)
Syntax
To get: notesDocument = notesSession.DocumentContext
Usage
For an agent activated in a view through the Notes client UI, the in-memory document is the document highlighted in the view.
For an agent run from a browser with the OpenAgent URL command, the in-memory document is a new document containing an item for each CGI (Common Gateway Interface) variable supported by Domino. Each item has the name and current value of a supported CGI variable. (No design work on your part is needed; the CGI variables are available automatically.)
und dann so (auf jeden Fall in R4):
This form action script places the current document and its immediate responses into the Interesting folder. It uses the PutInFolder method in NotesDocument to place each document in the folder.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim collection As NotesDocumentCollection
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set collection = doc.Responses
Call doc.PutInFolder( "Interesting" )
Set doc = collection.GetFirstDocument
While Not ( doc Is Nothing )
Call doc.PutInFolder( "Interesting" )
Set doc = collection.GetNextDocument( doc )
Wend
End Sub
-
...ok, ok ertsmal danke! ich glaub ich habe mich undeutlich ausgedrückt. also mein problem liegt darin, dass ich nicht an den namen der maske herankomme, deren dokument ich gerade im speicher habe. wie ich an das "currentdocument" komme, weis ich.
es geht grob um folgendes, wenn das "currentdocument" von der Maske "XYZ" "abstammt", dann soll eine bestimmte aktion nicht ausgeführt werden, in etwa so...
dim workspace as new notesuiworkspace
dim uidoc as notesuidocument
set uidoc = workspace.currentdocument
if 'Name der Maske des CurrentDocuments" = XYZ then
'do nothing
else
'do something
end if
jetzt, ist es wohl besser verständlich, was ich meine...
-
Du hast es schon or Dir.. ;)
also nochmals
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
'Dim collection As NotesDocumentCollection
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
'...dann
if doc.form(0)="ABC" Then
mach dies
Else
wenn nicht mach das
end if
-
Geht es dabei um neue Dokumente? Oder kannst du davon ausgehen, das die Doks bereits gespeichert wurden?
-
danke rob, jetzt weis ich auch wo mein fehler lag...
...doc.form(0)
man muss natürlich den index setzen, is ja ein array der zurückegeben wird! ... aber wieso hatte ich das schon, egal danke dir!!
doks sind bereits gespeichert...
ich liebe dieses forum!!!