Customer's Question :
We have a group of users that require a different Internet Address to be populated on the Notes Client Location document. We normally use @InternetAddress to make sure they are in sync. In this scenario the new Internet Address in in the field labeled "Comment".
Is there a way to pull the value of the Connects Field from the users person document and place it in the users Location document in the Internet Address Field?
Cooperteam's Solution :
Instead of using a @Keyword like @InternetAddress, you can use a #Keyword (values comes from the Notes.ini file).
Here is a method to transfer a field coming from the Person document into the Location document :
o Step 1 : Transfer the field value from the Person document of the NAB into the DskMgrUser document :
- In the Setup document, Go to 'Audit Configuration' Tab and add the field name (the one from the Person document) into 'Get fields from Person document in NAB'. You can had sevral fields, but make sure they are entered in all Setup document in the same order.
=> After Desktop Manager run, you should get the field value into the DskMgrUser document, in a field named PersonValue_XXX where XXX = 001, 002, 003... You will see the field value if you open the DskMgrUser document (Audit Results / User Identity).
o Step 2 : Transfer the value of the field, from the DskMgrUser document to the Notes.ini :
- Create an agent (see code below) and run it from a Profile. Make sure it will run BEFORE the synchronization of the Location documents. You may have to adapt the PersonValue_001 field name depending the order of the declaration in the Setup document.
Option Declare
Use "DskMgrSubLib"
Sub Initialize
Dim session As New NotesSession
Dim db_dskmgr As NotesDatabase
Dim db_dskmgruser As NotesDatabase
Dim db_cache As NotesDatabase
Dim doc_user As NotesDocument
' # Open All Desktop Manager databases (DskMgr, DskMgrUser and Cache)
Call GetAllDskMgrDatabase(session, session.CurrentDatabase, db_dskmgr, db_dskmgruser, db_cache)
If (db_dskmgr Is Nothing) Or (db_dskmgruser Is Nothing) Then Exit Sub
' # Get User document from Desktop Manager User (or Cache) database
Set doc_user = GetUserDocument(session, db_dskmgruser, db_cache)
If doc_user Is Nothing Then Exit Sub
' ## Copy DskMgrUser item into Notes.ini
Call session.SetEnvironmentVar("OTHER_ADDRESS",doc_user.PersonValue_001(0),True)
End Sub
o Step 3 : Use the Notes.ini value as a Keyword in the Location Template document :
- In the Template document, insteaad of using @InternetAddress, juste use #OTHER_ADDRESS#.
Comments
0 comments
Article is closed for comments.