...ich habs !
danke - eure vielen aussagen "und wo bitte ist das problem..."
haben mich beflügelt
ich lass den script im Queryopen - hab ein hidden field hinterlegt - welches wiederum für ein "computed for display" field
dient - am ende meines scripts wird genau diesen hidden field befüllt (temporär - also nicht gespeichert)
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim doc As NotesDocument
Dim SMdoc As NotesDocument
Dim uidoc As NotesUIDocument
Dim db As NotesDatabase
Dim view As NotesView
Dim dc As NotesDocumentCollection
Set db = session.CurrentDatabase
Dim Nummer As Variant
Dim smdoingtime As Long
Set view = db.GetView( "SMDoingTime" )
Set doc=source.document
Nummer = doc.GetItemValue( "SMnummer" )
'Set dc = view.GetAllDocumentsByKey(Nummer(0), False)
Set dc = view.GetAllDocumentsByKey("200000", False)
Set SMdoc = dc.GetFirstDocument
Do While Not(SMdoc Is Nothing)
CalcUsedSMDoingTime=SMdoc.GetItemValue("UsedTime")
If Cint(CalcUsedSMDoingTime(0)) = 0 Then
Goto loopweiter
Else
smdoingtime=smdoingtime+Cint(CalcUsedSMDoingTime(0))
End If
loopweiter:
Set SMdoc = dc.GetNextDocument(SMdoc)
Loop
Dim item As NotesItem
Set item = doc.ReplaceItemValue( "collectedTime", smdoingtime )
End Sub