Create a Last Modified On Date Stamp

Format a User s Name

Using several Formula Language functions, you can format a user's name. Formatting a name allows you to change the appearance and content.

How It Works

The @Name function is used to format a name string. The @UserName function is used to return the fully qualified Lotus Notes user name. The combination of these two functions can be used to retrieve and format a user's name. The following examples illustrate the CN, Abbreviate, and Canonical name formats.

ImplementationExample 1

To implement this technique, create an action button or computed field and insert the following formula. The @Prompt statement is used for illustrative purposes and can be removed or updated as desired. However, if removed, be sure the formula contains a main expression (i.e., Result) as the last statement in the formula. In this example, the common name is returnedMark Elliott (see Figure 14.10).

result := @Name([CN]; @UserName); @Prompt([Ok];"CN Format"; result);

Figure 14.10. Example of the CN-formatted user name

 

ImplementationExample 2

This second example, when added to an action button, illustrates the common, abbreviated, and canonical name formats (see Figure 14.11).

@Prompt([Ok]; "Formatted User Name"; "CN Format: " + @Name([CN]; @UserName) + @NewLine + "Abbreviate: " + @Name([Abbreviate]; @UserName) + @NewLine + "Canonical: " + @Name([Canonicalize]; @UserName))

Figure 14.11. A comparison of the user name formats

Категории