IMsDetermAggregationTransform.AggregationOperands

Syntax

AggregationOperands: IMsFormulaTermList;

Description

The AggregationOperands property returns the collection of terms that are used to compile the expression of aggregation.

Example

Executing the example requires that the repository contains a model with the 123456 key. Method of model calculation is aggregation (basic) that is calculated as a determinate equation.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    obj: IMetabaseObject;
    Model: IMsModel;
    Transform: IMsFormulaTransform;
    Formula: IMsFormula;
    DetermAggregation: IMsDetermAggregationTransform;
    i: Integer;
    Operands: IMsFormulaTermList;
Begin
    mb := MetabaseClass.Active;
    Obj := Mb.Item(123456).Edit;
    Model := Obj As IMsModel;
    Transform := Model.Transform;
    Formula := Transform.FormulaItem(0);
    Formula.Kind := MsFormulaKind.DetermAggregation;
    DetermAggregation := Formula.Method As IMsDetermAggregationTransform;
    Operands := DetermAggregation.AggregationOperands;
    Debug.WriteLine("Aggregation expression terms:");
    For i := 0 To Operands.Count - 1 Do
        Debug.WriteLine("  - " + Operands.Item(i).TermToText);
    End For;
    Operands := DetermAggregation.CompositionRelevanceOperands;
    Debug.WriteLine("Terms of calculation of aggregation threshold:");
    For i := 0 To Operands.Count - 1 Do
        Debug.WriteLine("  - " + Operands.Item(i).TermToText);
    End For;
    Operands := DetermAggregation.WeightsOperands;
    Debug.WriteLine("Expression terms for setting aggregation weights:");
    For i := 0 To Operands.Count - 1 Do
        Debug.WriteLine("  - " + Operands.Item(i).TermToText);
    End For;
End Sub UserProc;

After executing the example the console window displays aggregation expression terms, terms of aggregation threshold calculation expression and expression terms for setting aggregation weights.

See also:

IMsDetermAggregationTransform