IMsAggregationFilter.OutputParamID

Fore Syntax

OutputParamID: String;

Fore.NET Syntax

OutputParamID: string;

Description

The OutputParamID property determines the parameter, to which filter selection is saved in each calculation iteration.

Comments

Use the IMsAggregationFilter.AggregationSelection property to set selection.

Fore Example

Executing the example requires that the repository contains a time series database with the TSDB identifier containing a metamodel with the METAMODEL identifier in the internal modeling container. This metamodel must contain a model of extended aggregation with the MODEL identifier in calculation chain. The model must contain aggregation filter.

Add links to the Cubes, Dal, Metabase, Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Rubr: IRubricator;
    ms: IMetabaseObjectDescriptor;
    MetaModel: IMsMetaModel;
    Params: IMsModelParams;
    Param: IMsModelParam;
    Model: IMsModel;
    Trans: IMsFormulaTransform;
    Aggr: IMsCrossDimensionAggregationTransform;
    Filter: IMsAggregationFilter;
Begin
    mb := MetabaseClass.Active;
    Rubr := mb.ItemById("TSDB").Bind As IRubricator;
    ms := Rubr.ModelSpace;
    MetaModel := mb.ItemByIdNamespace("METAMODEL", ms.Key).Edit As IMsMetaModel;
    Params := MetaModel.Params;
    Params.Clear;
    Param := Params.Add;
    Param.DataType := DbDataType.String;
    Param.DefaultValue := "";
    Param.Name := "Selection";
    Param.ID := "Selection";
    (MetaModel As IMetabaseObject).Save;
    Model := mb.ItemByIdNamespace("MODEL", ms.Key).Edit As IMsModel;
    Trans := Model.Transform;
    Aggr := Trans.FormulaItem(0).Method As IMsCrossDimensionAggregationTransform;
    Filter := Aggr.Filter.Item(0);
    Filter.OutputParamID := "Selection";
    (Model As IMetabaseObject).Save;
End Sub UserProc;

Example execution result: the Selection string parameter, to which filter selection at each calculation iteration is saved, is added into the metamodel.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Rubr: IRubricator;
    ms: IMetabaseObjectDescriptor;
    MetaModel: IMsMetaModel;
    MParams: IMsModelParams;
    Param: IMsModelParam;
    Model: IMsModel;
    Trans: IMsFormulaTransform;
    Aggr: IMsCrossDimensionAggregationTransform;
    Filter: IMsAggregationFilter;
Begin
    mb := Params.Metabase;
    Rubr := mb.ItemById["TSDB"].Bind() As IRubricator;
    ms := Rubr.ModelSpace;
    MetaModel := mb.ItemByIdNamespace["METAMODEL", ms.Key].Edit() As IMsMetaModel;
    MParams := MetaModel.Params;
    MParams.Clear();
    Param := MParams.Add();
    Param.DataType := DbDataType.ddtString;
    Param.DefaultValue := "";
    Param.Name := "Selection";
    Param.ID := "Selection";
    (MetaModel As IMetabaseObject).Save();
    Model := mb.ItemByIdNamespace["MODEL", ms.Key].Edit() As IMsModel;
    Trans := Model.Transform;
    Aggr := Trans.FormulaItem[0].Method As IMsCrossDimensionAggregationTransform;
    Filter := Aggr.Filter.Item[0];
    Filter.OutputParamID := "Selection";
    (Model As IMetabaseObject).Save();
End Sub;

See also:

IMsAggregationFilter