GetUser Function

Action

Retrieves the name of the current user. The user name returned consists of the name of the user group defined in the workload section of the script concatenated with a serial number indicating the number of the user within the user group, with the two joined by an underscore character.

Include file

Kernel.bdh

Syntax

GetUser(): string;

Return value

The name of the current user.

Example

dcluser
  user
    TestUser
  transactions
    TGetUser : 1;

dcltrans
  transaction TGetUser
  var
    sUser: string;
  begin
    sUser := GetUser();
    write("user = "); write(sUser); writeln;
  end TGetUser;

Output

user = TestUser-<ProfileName>_1