Hi,
Can someone please help with my problem:
I have the following piece of code that goes through a view, gets the first document and then gets a field, it then stores that field which is a name of a person...eventually that name will need to be placed in the members field of a PRE CREATED group document in an Address Book Database, it then goes to the next field in the document and etc etc and then the next DOCUMENT is processed
I know which field values need to go into which group document (this i need to hardcode somewhere in my ForAll Statement below using maybe Case Statements) but how do i do this..i dont undertstand how i place the stored field in the relevant group document member field
Can someone please guide me or offer hints
Thanks
Sub Initialize
'Main code:
Dim s As New notessession
Dim db As notesdatabase
Dim nabdb As notesdatabase
Dim doc As notesdocument
Dim server As String
Dim devdoc As notesdocument
Dim devitem As notesitem
Dim docitem As notesitem
Dim gnameitem As notesitem
Set UnicornDb = s.currentdatabase
Set db = s.currentdatabase
server = db.server
Set nabdb = New notesdatabase(server, "unicorn\unicorn_test\WMPAB.nsf")
If nabdb.isopen = True Then
'''''''''''''NEW CODE HERE
Set SysDetsView = Unicorndb.GetView("SysDetsV")
Set SysDetsDoc = SysDetsView.GetDocumentByKey("A",True)
MailDbName = SysDetsDoc.MailDbName(0)
'
Set PABdb2 = s.getdatabase(serverName$, MailDbName)
If SysDetsDoc.AccessYN(0) = "No" And SysDetsDoc.MailYN(0) = "No" Then
Print "Create Access Control Groups = No"
Print "Create Mail Groups = No"
Print AgentName & " Stopped"
Exit Sub
End If
Set v = db.getview("DivisionsV")
count = 0
'++++++++++++++++++++++++++++++
Set Unidoc = v.getfirstdocument
Dim TAllACPO() As String
Dim i As Integer
Do Until Unidoc Is Nothing
If unidoc.DivName(0) = "Ghost" Then
Exit Sub
End If
'++++++++++++++++++++++++++++++
'Processing here
Forall aconame In unidoc.DivACPO
Redim Preserve TAllACPO(i)
TAllACPO(i) = aconame
'++++++++++++++
THIS IS WHERE I AM HAVING PROBLEMS
' In addressbook, find the following group documents in group view whose listname field equals
All ACO - PRE-CREATED GROUP
Birmingham ACO - PRE-CREATED GROUP
and place aconame value in member field
Having placed aconame in memeber field, save the group document and move to the next document in Division view
i = i + 1
End Forall
'++++++++++++
Set Unidoc = v.getnextdocument(Unidoc)
count = count + 1
Print count
Loop
'++++++++++++
Else
Msgbox "nab isn't open"
End If
'END OF MAIN CODE
End Sub

Get Value to Address Book document (Nadeem Shaikh 9.Jan.04)
. . 