IAuditFilter.Top

Syntax

Top: Integer;

Description

The Top property determines the number of observed records of the access protocol.

Comments

The property enables limiting the number of observed records of the access protocol, which speeds up working with it.

The property is set to 0 by default.

If the values are 0 and -1, the list of access protocol records is unlimited, that is, all records are observed.

Example

To execute the example, create a form, add a button with Button1 name, the IntegerEdit component with IntegerEdit1 name and the Memo component with Memo1 name, in IntegerEdit1 specify the required number of the access protocol records which must be displayed.

Add a link to the Metabase system assembly.

Sub ShowLog(log: IAuditLog);
Var
    opers: IAuditOperations;
Begin
    Memo1.Lines.Clear;
    opers := log.OpenOperations(-1);
    While Not opers.Eof Do
        Memo1.Lines.Add(opers.Name + "  " + opers.Stamp.ToString);
        opers.Next;
    End While;
End Sub ShowLog;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    log: IAuditLog;
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    log := MetabaseClass.Active.Security.OpenAuditLog;
    log.Filter.Top := IntegerEdit1.Value;
    ShowLog(log);
End Sub Button1OnClick;

On click the Button1 in the Memo1 field the list from the specified number of the last records of the access protocol appears.

See also:

IAuditFilter