Alena Smart 13.Feb.12 02:33 PM a Web browser Domino Designer7.0.2 FP3Windows XP
Hi,
I am trying to set/update the parent the reader and author field in the response but yet when saving the response the values are untouched...
Sub SettingValuesInReponseDocs(docParent As NotesDocument)
Dim collection As NotesDocumentCollection
Dim docResponse As NotesDocument
Dim docDep As NotesDocument
Dim itemDocReader As NotesItem, itemDocAuthors As NotesItem
Dim strAuthors As String
Dim strCleRegion(0) As String
Set collection = docParent.Responses
Set docResponse = collection.GetFirstDocument
strCleRegion(0) = docParent.UA(0)
Set docDep= fctGetDocument( "vRegion" , strCleRegion )
Dim strkey(0) As String
strkey(0) = docDep.txtDepResponsable(0) ***** the value of strkey is "Dep New-York"
‘ I am setting the item authors from the response doc.
Set itemDocAuthors = docResponse.getfirstitem("docAuthors")
Set itemDocReaders = docResponse.getfirstitem("docReader")
While Not docResponse Is Nothing ‘ I am picking up the right response…
If strkey(0) = "Dep New-York" Then
If strAuthors = "" Then
strAuthors = "[Coord_NY]"
strAuthors = strAuthors & ";" & "[Sup_NY]"
Else
strAuthors = strAuthors & ";" & "[Coord_NY]" & ";" & "[Sup_NY]"
End If
End If
stop
Set itemDocAuthors = docParent.Getfirstitem( "txtAuthors" )
itemDocAuthors.Values = Split( strAuthors , ";" )
****‘ the value for itemDocAuthors at this point is= ["[Coord_NY]", "[Sup_NY]"]
Call itemDocReaders.appendtotextList(docParent.txtReaders)
***‘ the value for itemDocReaders at this point is= "[R-NYC]"
itemDocReaders.Values = docParent.Getfirstitem( "docAuthors" ).Values
****‘ the value for itemDocReaders at this point is= "[R-NYC]", "[ Sup_NY]"
Call itemDocAuthors.appendtotextList(docParent.NameDirector)
****‘ the value for itemDocReaders at this point is= "[R-NYC]", "[ Sup_NY]", "Bob Cruise"
Call docResponse.Save(false,False)
This is only one response ever…
I see the values in the items , tet the values for the docAuthors et docReaders for the response are empty
Any ideas??? I believe that I am setting the items for the response corretly.
Set docResponse = collection.GetNextDocument ( docResponse )
Wend
End Sub