• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

populating information from a shortname

I have a users form

ShortName: [UserName]

First Name:   [FirstName]
Last Name:   [LastName]
Email           [Email]
Phone:         [Phone]
Manager      [Manager]

Is it possible to update all the fields under shortname after they select a person?
0
Jaziar
Asked:
Jaziar
1 Solution
 
JaziarAuthor Commented:
I am thinking they will use the Address book to find the user.  So maybe I could have a userName as the first field and the shortname will populate like the rest.
0
 
Sjef BosmanGroupware ConsultantCommented:
Set on the first field
    Refresh document on field change
0
 
JaziarAuthor Commented:
I under the stand the FirstName has to computed, but how does the field know to get the values from the document used to get UserName?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
p_parthaCommented:
Do a dblookup or nameslookup with Username as the key

Partha
0
 
JaziarAuthor Commented:
I put this in a feild default -UFirstName

@DbLookup("":"NoCache";"domino1/Lexmark":"names.nsf"; "($Users)";UserName; "FirstName");

I get the error on open that UFirstName is not in Index
0
 
JaziarAuthor Commented:
Being the UserName is a person field I do not have the option to refresh the fields - do I need a action button that refreshes all the fields - should the fields be computed.
0
 
HappyFunBallCommented:
Yes, you should use an action button instead that populates the Username field as well as the other computed fields.  Then you won't need to rely on the refresh on keyword change option.
0
 
JaziarAuthor Commented:
100 points to show me some code :)
0
 
HappyFunBallCommented:
Create Action button with this formula:

FIELD Username := @PickList([Name]:[Single]);
FIELD FirstName := @DbLookup("":"NoCache";"domino1/Lexmark":"names.nsf"; "($Users)"; UserName; "FirstName");
FIELD LastName := @DbLookup("":"NoCache";"domino1/Lexmark":"names.nsf"; "($Users)"; UserName; "LastName");
@True

... keep it going for the remaining fields.

0
 
JaziarAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now