Domino 9 und frühere Versionen > Entwicklung

Dokumente aus anderer DB heraus kopieren

(1/1)

Steffen_Albrecht:
Hallo,

ich habe zwei Datenbanken A und B.
Ich befinde mich einer Maske von Datenbank A, wähle
nun aus einer Ansicht von Datenbank B per @Picklist
einige Dokumente aus.
Danach soll auf Knopfdruck eine Kopie von jedem ausgewählten
Dokument in Datenbank A angelegt werden.

Jetzt meine Frage:
Hat jemand eine Idee wie das Script oder die Formel hinter
dem Button zum Kopieren der Dokumente aussehen muss?

Gruß
    Steffen

Rob Green:
auszug aus Help:

Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Set db=session.CurrentDatabase
'Launches a modal window dispaying all of the documents in the By Author 'view of the database Zippy
Set collection = workspace.PickListCollection(1, True, _
       "ZippyServer","Zippy","By Author","My Dialog", _
       "Please select a document or two.")
'The following line puts the selected documents in a folder called My 'Folder. The value True means that a folder will be created if one does not 'already exist.
Call collection.PutAllInFolder("My Folder",True)

statt call collection.putallinfolder machste Du ne Schleife nach "Set collection=" mit:

Dim doc as notesdocument
Set doc = collection.GetFirstDocument
While Not(doc Is Nothing)
Call doc.Copytodatabase(db)
Set doc = collection.GetNextDocument(doc)
Wend

Müßte so klappen.

Navigation

[0] Themen-Index

Zur normalen Ansicht wechseln