IAuditFilterCondition.UserName

Syntax

UserName(Index: Integer): String;

UserName[Index: integer]: string;

Parameters

Index. Position index. The number of users is defined by the IAuditFilterCondition.UserNameCount property.

Description

The UserName property determines the name of the platform user for which the records of the log will be displayed.

Example

Executing the example requires an access protocol filter with the FILTER identifier and the Bashkirtseva and Sedunov users.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    FilCon: IAuditFiltersContainer;
    Objs: IAuditFilterObjects;
    Obj: IAuditFilterObject;
    Con: IAuditFilterCondition;
    Fil: IAuditFilter;
Begin
    FilCon := New AuditFiltersContainer.Create;
    FilCon.Load;
    Objs := FilCon.Filters;
    Obj := Objs.FindById("FILTER").Edit;
    Fil := Obj.Filter;
    Con := Fil.Item(0);
    Con.UserNameCount := 2;
    Con.UserName(0) := "Bashkirtseva";
    Con.UserName(1) := "Sedunov";
    Obj.Save;
    FilCon.SaveToFile(FilCon.DefaultFileName);
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    FilCon: IAuditFiltersContainer;
    Objs: IAuditFilterObjects;
    Obj: IAuditFilterObject;
    Con: IAuditFilterCondition;
    Fil: IAuditFilter;
Begin
    FilCon := New AuditFiltersContainer.Create();
    FilCon.Load();
    Objs := FilCon.Filters;
    Obj := Objs.FindById("FILTER").Edit();
    Fil := Obj.Filter;
    Con := Fil.Item[0];
    Con.UserNameCount := 2;
    Con.UserName[0] := "Bashkirtseva";
    Con.UserName[1] := "Sedunov";
    Obj.Save();
    FilCon.SaveToFile(FilCon.DefaultFileName);
End Sub;

After executing this example the property of filter condition is changed: show records of access protocol only for specified users.

See also:

IAuditFilterCondition