Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: Get Value to Address Book document
Scott Carpenter 9.Jan.04 04:31 PM a Web browser
Domino Designer -- LotusScript 4.6.5a Windows NT


I have a lot of trouble following someone else's code, so it was faster for me to just sit down and quickly write an example. This isn't tested, so be aware there may be typos in it. It's just to give you an idea of what it would look like.

This code goes through a database filled with documents that have a field called EmployeeName. It takes the name stored in each document and adds that name to two groups on the server.

Sub Initialize
Dim s As New NotesSession

Dim thisdb As NotesDatabase
Dim pabdb As NotesDatabase

Dim pabview As NotesView
Dim thisview As NotesView

Dim empdoc As NotesDocument
Dim group1doc As NotesDocument
Dim group2doc As NotesDocument

Dim group1members As NotesItem
Dim group2members As NotesItem

Set thisdb = s.CurrentDatabase
Set pabdb = s.GetDatabase ( "Server01" , "names.nsf" )

Set thisview = thisdb.GetView ( "MyView" )
Set pabview = pabdb.GetView ( "Groups" )

Set group1doc = pabview.GetDocumentByKey ( "Group1" )
Set group2doc = pabview.GetDocumentByKey ( "Group2" )

Set group1members = group1doc.GetFirstItem ( "Members" )
Set group2members = group2doc.GetFirstItem ( "Members" )

Set empdoc = thisview.GetFirstDocument

While Not empdoc Is Nothing

Call group1members.AppendToTextList ( empdoc.EmployeeName(0) )
Call group2members.AppendToTextList ( empdoc.EmployeeName(0) )

Set empdoc = thisview.GetNextDocument ( empdoc )
Wend

Call group1doc.Save ( True , False )
Call group2doc.Save ( True , False )

End Sub



Get Value to Address Book document (Nadeem Shaikh 9.Jan.04)
. . RE: Get Value to Address Book docum... (Scott Carpenter... 9.Jan.04)
. . RE: Get Value to Address Book docum... (Coni Loving 9.Jan.04)






  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow