IMetabaseCache.FlushById

Syntax

FlushById(Id: String): Boolean;

Parameters

Id. Repository object identifier.

Description

The FlushById method flushes links of repository object by its identifier.

Comments

The method returns True if flush succeeded.

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.

Sub Main;

Var

mb: IMetabase;

currObj: IMetabaseObject;

currPar: IMetabaseObjectParamValues;

currDimInst: IDimInstance;

currEls: IDimElements;

Begin

MB := MetabaseClass.Active;

Debug.WriteLine("Open a dictionary with parameter '0'");

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 a dictionary with parameter '10'");

MB.Cache.FlushById("PARAM_DICT");

currPar.FindById("ITEM").Value := 10;

currDimInst := currObj.Open(currPar) As IDimInstance;

currEls := currDimInst.Elements;

Debug.WriteLine("Number of elements: "+currEls.Count.ToString);

End Sub Main;

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:

IMetabaseCache