Hallo Axel, hallo Forum,
mit ein paar Änderungen funktioniert die rekursive "Vererbung" von Feldinhalten in alle Response-Ebenen hinunter. Vielen Dank für den Tipp Axel.
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim curDoc As NotesDocument
Dim empItems(… To …) As String
Set curDoc = Source.Document
'... code to create the empItems record array
empItems(1) = curDoc.FieldName(0)
.....
Call UpdateAllResponseDocs (curDoc, empItems() )
End Sub
Sub UpdateAllResponseDocs( docToCheck As NotesDocument, empItems() As String)
On Error Resume Next
Dim responseDocuments As NotesDocumentCollection
Dim responseDoc As NotesDocument
Dim m As Integer
'...get all immediate responses of this document
Set responseDocuments = docToCheck.Responses
If responseDocuments.Count > 0 Then
For m = 1 To responseDocuments.Count
Set responseDoc = responseDocuments.GetNthDocument(m)
'..update your items here
Set Item = responseDoc.ReplaceItemValue( "FieldName", empItems(1) )
…………..
Call responseDoc.Save (True, True)
'...this sub gets recursively called until all response docs are updated
Call UpdateAllResponseDocs( responseDoc, empItems )
Next
End If
Alexis