Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Refresh Names Field after Name Change in Address Book

Posted on 2008-06-24
Medium Priority
Last Modified: 2013-12-18
I have a database that tracks attendance and project membership.  When someone has a name change in our Notes Address Book, I have been going in and manually opening and saving the documents to refresh the Name field of the employee.  I have not found a code that works to do this.  I have tried the @Command([ToolsRefreshDocs]) and @Command([ToolsRefreshSelectedDocs]). This is not refreshing the name to update with the new names (Example: Donna Smith gets married and becomes Donna Anderson, I need to update her past documents to have the correct name now)

Anyone have any suggestions - I am open to anything and I am still new to LotusScript or I would create an event or action that could do it.
Question by:kali958
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 17

Accepted Solution

fgrushevsky earned 2000 total points
ID: 21858354
There are couple things you can do.

Yes, you can create an agent that would run everyday and check user names within your application against names in the Notes address book.

However, instead of writing this agent (which would require programming logic for different name changes etc) you can make Lotus Notes check and update all these names for you automatically.
This is what you will need for this:
1) Within your database, make sure that user name is stored in the "names" field and not in the "text" field
2) within database ACL, on the advanced tab, make sure that  "administrative server" is specified. Also, on the same tab, make sure that "Action" is set to "modify all Names" field.

If 1 and 2 conditions are  met, then adminp server process will update names for you when user is renamed.
LVL 17

Expert Comment

ID: 21858424
btw, if your database has many document types, you can speed up rename process by creating $AdminP view. If this view is present, adminp process will only check documents in this view and not the whole database. So this view should include all documents where user names can be renamed.

From Admin Help:
By default, the Administration Process scans all documents in a database looking for matches in the Readers and Authors fields or Names fields, when an Administration Request for a particular value in that field is received. You can create a view that restricts the scanning for matches in Readers and Authors fields, or Names fields, to the documents appearing in that view. The view must be assigned the name $AdminP.

Author Comment

ID: 21858553
1) Within your database, make sure that user name is stored in the "names" field and not in the "text" field
    Answer: It is a NAMES field that i am using that uses the Address Book for names.

2) within database ACL, on the advanced tab, make sure that  "administrative server" is specified. Also, on the same tab, make sure that "Action" is set to "modify all Names" field.
    Answer: The Modify names is on.

The $AdminP is way over my head -

So there is no refresh agent or something that I could do to just refresh the names field to change from the old last name to the new last name?  My Admin contact does not know of any way other then to manually do this but when I have over 200 documents for this person, I would rather not do it manually.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 17

Expert Comment

ID: 21858696
$adminp view you don't have to use, no worries

so you are saying that
the field type for storing user names is "Names" (field type, not field name)
the database has correct administrative server
the action setting on the advanced tab of the database ACL says "Modify all names"

and when user is renamed, the field is not updated?

If this is correct, then you need to check - together with your administrator - that adminp process is up and running and that you are using this process to rename users

Open admin4.nsf and search for the users that were renamed. are there any errors? is there mentioning for your database in any of the rename requests?

Author Comment

ID: 21858775
Yes, the three statements you have above are correct.

Field is Names
Database has correct admin server
Action is Modify Names

I have a field on the attendance form called EmployeeName that is a Names Field and is computed. It has the @Name([CN];@UserName) on it. This is one of the many fields i need updated with the New Last name verse the Old Last name. I found that when I just tried to refresh the form, it did not update so I thougth there could be an agent that I could run to do that for me.  

I am not sure if my administrators know or have it set that when someone changes their name in the NAB that it goes and finds databases with names fields and updates them. I do not think that this happens.

I did open admin4.nsf and now i hae no clue what i am looking at.  

Author Closing Comment

ID: 31470219
Thank you for all your help, I will have to take this now to my admins. I have seen where they do update some databases but not all. So that is a concern for me. I will be working with them. Thank you for the articles - it will help me make my point.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here:
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA:…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question