Ich hab da ein Problem:
Ich möchte alle dokumente in einer View kopieren. Dabei aber den Inhalt eines Feldes anpassen über set value of doc.
Leider ensteht dadurch die Fehlermeldung Eintrag im Index nicht gefunden (Copy)
Ohne Ändern des Feldinhaltes Funktioniert alles.
Gibt es eine andere Möglichkeit den Feldinhalt zu ändern?
Mein Code
Dim s As New NotesSession
Dim viewAll As NotesView
Dim viewc As NotesView
Dim sel As String
Dim ws As New NotesUIWorkspace
Dim object As String, docui As NotesUIDocument
Dim proposal As String
Dim version As String
Dim db As NotesDatabase
object= ws.CurrentDocument.FieldGetText("object")
proposal= ws.CurrentDocument.FieldGetText("ProjectID")
version = ws.CurrentDocument.FieldGetText("version")
sel = "SELECT (((cc_Formname ='fa_QA_testcase') | (cc_Formname = 'QA_testcase')) & (object = '" + object + "') & (((version_from<='" + version +"')|(version_until>='" + version +"'))&(version_from<='" + version +"')| (version_from=''))&(Proposal='0'))"
Set viewAll = s.CurrentDatabase.GetView("TestcasebyObjectAndVersion")
Set viewc = _
s.CurrentDatabase.CreateView("Copy", sel)
Set db = s.CurrentDatabase
Set view = db.GetView("Copy")
Set doc = view.GetFirstDocument
While Not(doc Is Nothing)
'Use the call statement because to return
'value is needed
Call doc.CopyToDatabase(db)
'...set value of doc...
doc.Proposal= proposal
Call doc.Save( True, True )
Set doc = view.GetNextDocument(doc)
Wend
Call view.Remove()
Danke schonmal
LG
Daniela