Link to home
Start Free TrialLog in
Avatar of kali958
kali958Flag for United States of America

asked on

Refresh Names Field after Name Change in Address Book

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.
ASKER CERTIFIED SOLUTION
Avatar of Felix Grushevsky
Felix Grushevsky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of kali958

ASKER

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.
$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?
Avatar of kali958

ASKER

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.  
Avatar of kali958

ASKER

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.