IMetabaseObject.ParamValues

Syntax

ParamValues: IMetabaseObjectParamValues;

Description

The ParamValues property returns an object that contains parameters values for opening nested objects.

Comments

On opening repository object with parameters an object that contains data and are embedded with opened object is created in cache. To reopen an object with new parameters values it is necessary to flush cache in the opened object (Flush, FlushById) or assign empty values (CreateEmptyValues) to all parameters of the used object.

Example

Executing the example requires that the repository contains a parameterized dictionary with the PARAM_DICT identifier. The dictionary must contain a numeric parameter with the ITEM identifier that influences filtering elements.

Add links to the Dimensions, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    currObj: IMetabaseObject;
    currPar: IMetabaseObjectParamValues;
    currDimInst: IDimInstance;
    currEls: IDimElements;
Begin
    MB := MetabaseClass.Active;
    Debug.WriteLine("Open dictionary with the 0 parameter");
    currObj := MB.ItemById("PARAM_DICT").Bind;
    currPar := currObj.ParamValues;
    currPar.FindById("ITEM").Value := 0;
    currDimInst := currObj.Open(currPar) As IDimInstance;
    currEls := currDimInst.Elements;
    Debug.WriteLine("Number of elements: " + currEls.Count.ToString);
    Debug.WriteLine("Open dictionary with the 10 parameter");
    currPar := currObj.Params.CreateEmptyValues;
    currPar.FindById("ITEM").Value := 10;
    currDimInst := currObj.Open(currPar) As IDimInstance;
    currEls := currDimInst.Elements;
    Debug.WriteLine("Number of elements: " + currEls.Count.ToString);
End Sub UserProc;

After executing the example the dictionary is opened with different parameter values. Number of elements of the dictionary after filtering is displayed in the console window.

See also:

IMetabaseObject