Address book and sync a few fields to another database

There are several fields that I need to sync from the address book to another database like phone and cell phone numbers based on matching full name. Does anyone has any code to share?

Subject: address book and sync a few fields to another database

What do you mean by ‘sync’? Are you looking for something that runs on a schedule and pushes/pulls data between the two systems or do you just want the 2nd db to pull in the relevant data in real time when it’s needed?

In either case, I’d see pulling data from the address book into db2 easiest to implement by just using @DbLookup. Notes designer help has sufficient information to explain how this command works.

Side question: are you a designer or an end user?

Subject: RE: address book and sync a few fields to another database

i just want to sync some fields from the address book to another database like phone numbers

Subject: RE: address book and sync a few fields to another database

What do you mean by “sync”?

The reason Doug is asking if you are a developer or an end-user is that “sync” has a very specific meaning in programming.

Also, if you are a developer, you should be able to specify much more in detail what it is you want to do. Nothing you are asking about is complicated, as a matter of fact it is trivial to write an agent in one database that either push data to or pull data from specific fields in another database.

But you need to specify more details. Where is the list of user names coming from? Exactly what fields are to be transferred? Should it really be synced (two-way), so if the values get updated in the second database they are sent back to names.nsf? Things like that.

Subject: address book and sync a few fields to another database

You can use my class for lookups into Domino Directory: Class for Domino Directory lookups – TexasSwede

Then you just write a few lines of code, something like this:

Dim nab As New NotesAddressBook(“YourServer/Domain”)

Dim officephoneNumber As String

Dim mobilephoneNumber As String

Dim username As String

username = “Jane Doe”

officephoneNumber = nab.GetText(username,“OfficePhoneNumber”)

mobilephoneNumber = nab.GetText(username,“CellPhoneNumber”)

Subject: RE: address book and sync a few fields to another database

Sounds like what I need. Yes, it is common to extract information from the main address book for many databases. Just need to update it at one spot and it flows to the others with accuracy and updated values.

Subject: RE: address book and sync a few fields to another database

What you describing is not “syncing”, it is “reading values from Domino Directory” or “updating documents in databases with values from Domino Directory”.

Subject: RE: address book and sync a few fields to another database

Did you get it to work?