Manage Learn to apply best practices and optimize your operations.

Update Responses And Response To Responses At All Levels Fron The Parent Document

This script is to update responses and response to responses of parent and
responses documents at all levels from the parent document.
This code getting the value of NPR_number in the parent or current document and
update all responses and responses to responses of parent and all response
documents with this value.

Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim nprnumber As String
Set uidoc = workspace.CurrentDocument
nprnumber = uidoc.fieldgettext("NPR_Number")
Set doc = uidoc.Document
Call updateresponses(doc, nprnumber)

End Sub

Sub updateresponses(doc As NotesDocument, number As String)
Dim collection As NotesDocumentCollection
Dim currentResponse As NotesDocument
Set collection = doc.Responses
Set currentResponse = collection.GetFirstDocument
While Not ( currentResponse Is Nothing )
Call currentResponse.ReplaceItemValue("NPR_Number",number)
Call currentResponse.Save(True,False)
Call updateresponses(currentResponse, number)
Set currentResponse = collection.GetNextDocument(currentResponse)
End Sub

Surendra Talluri

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...