Agent to Update profiles

Posted on 2006-05-26
Last Modified: 2013-12-18
I have a userInfo form.  

The form keeps the Users information such as  Bldg, Floor, Manager, etc

So I wrote a action button that when you click the button a address book opens, you select the users name, then all the fields in the User form are populated from the address book.  This works well.  The problem is when a user moves or gets a new manager the form is not updated.  So the information is dated.  I woould like to have a agent that would run nightly.

The agent would open each document (UserForm) get the users shortName (field called ShortName) and then update the rest of the fields in the form.

I have a view Named Users that list all the users.

Here is the code in the button

FIELD Username := @PickList([Name]:[Single]);
FIELD ShortName := @DbLookup("":"NoCache";"domino1/Company":"names.nsf"; "($Users)"; UserName; "ShortName");
FIELD UFirstName := @DbLookup("":"NoCache";"domino1/Company":"names.nsf"; "($Users)"; UserName; "FirstName");
FIELD ULastName := @DbLookup("":"NoCache";"domino1/Company":"names.nsf"; "($Users)"; UserName; "LastName");
FIELD UEmail := @DbLookup("":"NoCache";"domino1/Company":"names.nsf"; "($Users)"; UserName; "MailAddress");
FIELD Department := @DbLookup("":"NoCache";"domino1/Company":"names.nsf"; "($Users)"; UserName; "Department");
FIELD UPhone := @DbLookup("":"NoCache";"domino1/Company":"names.nsf"; "($Users)"; UserName; "OfficePhoneNumber");
FIELD UOffice:= @DbLookup("":"NoCache";"domino1/COmpany":"names.nsf"; "($Users)"; UserName; "OfficeNumber");
FIELD UBuilding := @DbLookup("":"NoCache";"domino1/Company":"names.nsf"; "($Users)"; UserName; "BLDG");
FIELD UManager := @DbLookup("":"NoCache";"domino1/Company":"names.nsf"; "($Users)"; UserName; "Manager");

Instead of the pickList I want the Value of UserName to be the value in the Username field on the form.

This is very important and I need help as soon as possible.

Question by:Jaziar
    LVL 63

    Accepted Solution

    If the Username is already popluated, then  you can simply eliminate the first line with the picklist.

    I hope this helps !

    Author Comment

    That seemed too simple
    LVL 18

    Expert Comment

    Just as a sidebar, and I"m not sure how many documents you are updating, but for a few documents, the formula agent will do the trick, after that you have performance issues and you should abandon the formula for a robust script.

    Please see this:

    So, while your formula will work, I believe it is inadvisable for updating large number of documents -- over 100, or 200.

    Author Comment

    Marilying, I am having some issues with the agent.  I am going to create a new question

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
    I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    732 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now