FORMULA LANGUAGE
Returns the current user name.
If the user name is hierarchical, @UserName returns it in canonical format (including the CN, OU, O, and C identifiers). To return the name in abbreviated format (omitting those identifiers), use @V3UserName.
Notes
@UserName ( index )
Parameters
index
Note This parameter is new with Release 5.
name
When a formula runs on a server, the agent signer is considered the current user. Therefore, @UserName should only be used on local databases, where it will return the user's name. Using @UserName in server-based private views also returns the user's name, but produces unpredictable results if the views on the server are rebuilt using Updall. You should not use @UserName in a public view, doing so produces unpredictable results. Also, if the field that you are referencing changes, you will get unpredictable results because the index has to be rebuilt to accommodate the new information.
One use for @UserName is to display only those documents relevant to the current user. For example, your Service Request database could use @UserName in the private view named Assignments to display each technician's assignments, weeding out everyone else's:
SELECT @UserName=AssignedTo
However, the user can still design a different private view that retrieves all documents, so don't depend on @UserName as a security mechanism.
For an alternative way to display only documents relevant to the current user, see "To show a single category in an embedded view."
If you are using Release 5 and have an alternate name as well as a primary name, it is best to store the alternate name in the document as author information when using the extended feature of @UserName.
Language cross-reference
UserName property of LotusScript NotesSession class
UserName property of Java Session class
Example See Also