IAuditFilterCondition.IdFilter

Syntax

IdFilter: IStringFilterCondition;

IdFilter: Prognoz.Platform.Interop.Metabase.IStringFilterCondition;

Description

The IdFilter property determines an identifier of an object for that protocol records are necessary to be displayed.

Comments

After applying this filter the protocol contains records for objects that identifier has specified text.

Example

Executing the example requires an access protocol filter with the FILTER identifier and report with the report identifier in repository.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    FilCon: IAuditFiltersContainer;
    Objs: IAuditFilterObjects;
    Obj: IAuditFilterObject;
    Con: IAuditFilterCondition;
    Fil: IAuditFilter;
    Filter: IStringFilterCondition;
Begin
    FilCon := New AuditFiltersContainer.Create;
    FilCon.Load;
    Objs := FilCon.Filters;
    Obj := Objs.FindById("FILTER").Edit;
    Fil := Obj.Filter;
    If Fil.Count <= 0 Then
        Con := Fil.Add;
    Else
        Con := Fil.Item(0);
    End If;
    Filter := Con.IdFilter;
    Filter.IsON := True;
    Filter.CaseSensitive := True;
    Filter.WholeWordsOnly := False;
    Filter.Value := "Report";
    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;
    Filter: IStringFilterCondition;
Begin
    FilCon := New AuditFiltersContainer.Create();
    FilCon.Load();
    Objs := FilCon.Filters;
    Obj := Objs.FindById("FILTER").Edit();
    Fil := Obj.Filter;
    If Fil.Count <= 0 Then
        Con := Fil.Add();
    Else
        Con := Fil.Item[0];
    End If;
    Filter := Con.IdFilter;
    Filter.IsON := True;
    Filter.CaseSensitive := True;
    Filter.WholeWordsOnly := False;
    Filter.Value := "Report";
    Obj.Save();
    FilCon.SaveToFile(FilCon.DefaultFileName);
End Sub;

After executing the example the filtering condition is changed: access protocol records are displayed only for the objects, that contain the Report in their identifiers.

See also:

IAuditFilterCondition