IMsAggregationFilterList.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index. Filter index in the collection.

Description

The Remove method removes filter from the collection by its index.

Comments

If the filter is removed successfully, the property returns True, otherwise it returns False.

Example

Executing the example requires that the repository contains a time series database with the FC identifier. A modeling container of this database must include a model with the MODEL_AGGR identifier calculated using extended aggregation method.

Add links to the Cubes, Dimensions, Metabase, Ms, Rds system assemblies.

Sub Main;
Var
    mb: IMetabase;
    RubrDescr: IMetabaseObjectDescriptor;
    Rubr: IRubricator;
    msDescr: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transform: IMsFormulaTransform;
    Formula: IMsFormula;
    Aggr: IMsCrossDimensionAggregationTransform;
    FiltesList: IMsAggregationFilterList;
Begin
    mb := MetabaseClass.Active;
    RubrDescr := mb.ItemById("FC");
    Rubr := RubrDescr.Bind As IRubricator;
    msDescr := Rubr.ModelSpace;
    Model := mb.ItemByIdNamespace("MODEL_AGGR", msDescr.Key).Edit As IMsModel;
    Transform := Model.Transform;
    Formula := Transform.FormulaItem(0);
    Aggr := Formula.Method As IMsCrossDimensionAggregationTransform;
    FiltesList := Aggr.Filter;
    If FiltesList.Count > 1 Then
        FiltesList.Remove(0);
    End If;
   (Model As IMetabaseObject).Save;
End Sub;

After executing the example, if the model contains filters, the first aggregation filter will be removed from the collection.

See also:

IMsAggregationFilterList