Ich möchte aus einer View markierte Dokumente in eine andere Datenbank kopieren. Dabei sollen nur bestimmte Felder Kopiert werden, u.a. auch ein RichText-Feld.
Beiträge von Detti
-
-
Vielleicht hilft das auch:
Sub Querymodechange(SRCE As Notesuidocument, Continue As Variant)
'*******************************************************************************************************************************
If SRCE.EditMode = True Then Exit Sub
Dim DOCU As NotesDocument
Set DOCU = SRCE.Document
Const Mac$ = " @Keywords(""[ADMI]"" : ""[HÄND]"" ; @UserRoles; @NewLine) "
Role = Evaluate(Mac$, DOCU)
If Role(0) = "" Then
M% = Messagebox("Die Bearbeitung des Dokuments ist Ihnen nicht gestattet!" , 0 + 48, "Hinweis . . .")
Continue = False
Exit Sub
End If
If DOCU.Status(0) = "NEU" Or DOCU.Status(0) = "GH1" Or DOCU.Status(0) = "RET" Then
Continue = True
Else
M% = Messagebox("Die Bearbeitung des Dokuments ist Ihnen nicht mehr gestattet!" , 0 + 48, "Hinweis . . .")
Continue = False
End If
'*******************************************************************************************************************************
End Sub -
Jetzt Klappt's :
Erstmal vielen Dank füt die Hilfe.
Sub Initialize
Dim session As Notessession
Dim db As NotesDatabase
Set Session = New Notessession
Set db =Session.CurrentDatabase
Dim View As NotesView
Set View=db.getview("Zahl")
Dim DOCU As NotesDocument
Dim Array() As Integer
Set DOCU = VIEW.GetFirstDocument
Do Until DOCU Is Nothing
UB = Ubound(Docu.zahl)
For i=0 To UB
Redim Preserve Array(i)
Array(i) = Docu.zahl(i)
Next
Redim Preserve Array(i)
Array(i) = 10
DOCU.Zahl = Array
Call Docu.Save(True,True)
Set DOCU = VIEW.GetNextDocument(DOCU)
Loop
End Sub -
Hier der Script:
Sub Initialize
Dim session As Notessession
Dim db As NotesDatabase
Set Session = New Notessession
Set db =Session.CurrentDatabase
Dim View As NotesView
Set View=db.getview("Zahl")
Dim DOCU As NotesDocument
'************************************************************************************************
Set DOCU = VIEW.GetFirstDocument
Do Until DOCU Is Nothing
Values = docu.Zahl
Values = Arrayappend(Values, 10)
docu.Zahl = Values
Set DOCU = VIEW.GetNextDocument(DOCU)
Loop
Print "ende"
End SubBeim Ausführen kommt der Fehler lt. Anhang
-
Ich möchte mit Script an ein Feld mit einer Zahlenliste weitere Werte anhängen. Leider bekomme ich das nicht hin. Endergenis sit immer ein String und keine Zahlenliste