FlushById(Id: String): Boolean;
Id - identifier of repository object.
The FlushById method flushes links of repository object by its identifier. It returns True if flush succeeded.
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 this 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: