@V3UserName (Formula Language)
Returns the current user name or server name. Using @V3UserName on a local database or in a private view in a server-based database returns the user's name.
If the user name is hierarchical, @V3UserName returns the name in abbreviated format (omitting the CN, OU, O, and C identifiers). To return the name in canonical format, use @UserName.
Syntax
@V3UserName
Return value
name
Text. The current user name or server name.
Usage
When a formula runs on a server, the server is considered the current user, so @V3UserName returns the name of the server. We do not recommend using @V3UserName in a public view. Doing so produces unpredictable results.
One use for @V3UserName is to display only those documents relevant to the current user. For example, your Service Request database could use @V3UserName in the private view named Assignments to display each technician's assignments, weeding out everyone else's:
SELECT @V3UserName=AssignedTo
However, the user can still design a different private view that retrieves all documents, so don't depend on @V3UserName as a security mechanism.
Examples
- @V3UserName returns Robert T. Smith if this is the name associated with the current user ID and returns Robert T. Smith/LA/Deli if this is the hierarchical name associated with the user ID.
- @Right(@V3UserName;" ") returns Fletcher if William Fletcher is
the name associated with the current user ID.
If the user ID is hierarchical, the following code returns Fletcher:
@Right(@Name([CN]; @V3UserName); " ")
- @UpperCase(@Right(@V3UserName;" ")) returns FLETCHER if William
Fletcher is the name associated with the current user ID.
If the user ID is hierarchical, the following code returns FLETCHER:
@UpperCase(@Right(@Name([CN]; @V3UserName); " "))
- Given this hierarchical user ID:
CN=Mary Tsen/OU=Illustration/OU=Documentation/OU=Development/ OU=R&D/O=WorkSavers/C=US
@V3UserName returns the name in abbreviated format:
Mary Tsen/Illustration/Documentation/Development/R&D/WorkSavers/US
To return the name in canonical format (using the CN, OU, O, and C identifiers), use @UserName.