IMsDimIteratorAdvancedFilterCondition.ConditionJoin

Syntax

ConditionJoin: MsLogicalOperator;

Description

The ConditionJoin property determines a logical statement on joining advanced filter conditions.

Example

Executing the example requires that the repository contains a calculation algorithm with the ALGORITHM identifier that contains a calculation block. A data consumer containing at least two dimensions should be selected for the calculation block. Advanced filter and several filtering conditions are set for the first dimension.

Add links to the Algo, Metabase, Ms system assemblies and also add links to the assemblies that are required to work with calculation algorithms.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Algo, CalcBlock: ICalcObject;
    List: ICalcObjectsList;
    CalcAlgo: ICalcAlgorithm;
    Block: ICalcBlock;
    AdvancedFilter: IMsDimIteratorAdvancedFilter;
    Condition: IMsDimIteratorAdvancedFilterCondition;
    MultiDimIter: IMsCalculationChainMultiDimIterator;
    Dims: IMsDimIteratorDimensions;
    Dim: IMsDimIteratorDimension;
    Filter: IMsDimIteratorFilter;
    CountDims: Integer;
Begin
    MB := MetabaseClass.Active;
    
// Get calculation algorithm
    MObj := MB.ItemById("ALGORITHM");
    Algo := CalcObjectFactory.CreateCalcObject(MObj, 
True);
    CalcAlgo := Algo 
As ICalcAlgorithm;
    
// Get list of calculation algorithm objects
    List := CalcAlgo.Items;
    
// Get calculation block
    CalcBlock := List.Item(0);
    Block := CalcBlock 
As ICalcBlock;
    
// Get multidimensional iterator of calculation block
    MultiDimIter := Block.Iterator;
    
// Get collection of data consumer dimensions
    Dims := MultiDimIter.Dimensions;
    
// Get the first dimension of data consumer
    CountDims := Dims.Count;
    Dim := Dims.Item(CountDims - 
1);
    
// Set up advanced filter for obtained dimension
    Filter := Dim.Filter;
    AdvancedFilter := Filter.AdvancedFilter;
    
// Get the second filtering condition
    Condition := AdvancedFilter.Item(1);
    
// Change logical statement
    Condition.ConditionJoin := MsLogicalOperator.Or_;
    
// Save changes in calculation block
    Block.SaveObject;
End Sub UserProc;

After executing the example the AND logical statement is changed to the OR logical statement for the second filtering condition specified in the advanced filter.

See also:

IMsDimIteratorAdvancedFilterCondition