IAuditFilterCondition.ClassCount

Syntax

ClassCount: Integer;

ClassCount: integer;

Description

The ClassCount property determines number of classes by which filtering is performed.

Example

Executing the example requires an access protocol filter with the FILTER identifier.

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.ClassCount := 2;
    Con.ClassId(0) := MetabaseObjectClass.KE_CLASS_PROCEDURALREPORT;
    Con.ClassId(1) := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT;
    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.ClassCount := 2;
    Con.ClassId[0] := MetabaseObjectClass.KE_CLASS_PROCEDURALREPORT As Integer;
    Con.ClassId[1] := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT As Integer;
    Obj.Save();
    FilCon.SaveToFile(FilCon.DefaultFileName);
End Sub;

After executing this example the property if filter condition is changed: show records of access protocol for objects classes "Regular repost" and "Express report".

See also:

IAuditFilterCondition