IRubricatorFactorDependenciesLookup.WhereDependentFactorKey

Syntax

WhereDependentFactorKey: Integer;

Description

The WhereDependentFactorKey property determines a key of dependent factor.

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. A time series database must contain a formulas dictionary.

Sub Main;

Var

mb: IMetabase;

Rub: IMetabaseObject;

RubInst: IRubricatorInstance;

DepLoo: IRubricatorFactorDependenciesLookup;

DepData: IRubricatorFactorDependencyData;

Begin

mb := MetabaseClass.Active;

Rub := mb.ItemById("OBJ_RUBRICATOR").Bind;

RubInst := Rub.Open(Null) As IRubricatorInstance;

DepLoo := RubInst.CreateDependenciesLookup;

DepLoo.WhereCalendarPoint := DateTime.Parse("01.01.1980 00:00:00");

DepLoo.WhereDependentFactorKey := 98544;

DepLoo.Open;

While (Not DepLoo.Eof) Do

DepData := DepLoo.Current;

Debug.WriteLine("Factor key:" + DepData.FactorKey.ToString);

Debug.WriteLine("Revision key": + DepData.RevisionKey.ToString);

Debug.WriteLine("Formula key": + DepData.FormulaKey.ToString);

Debug.WriteLine("Position in the formula:" + DepData.Position.ToString);

Debug.WriteLine("-----");

DepLoo.Next;

End While;

DepLoo.Close;

End Sub Main;

After executing the example an object is created that searches for dependencies in the time series database by calendar point and key of the dependent factor. Information about found dependencies is displayed in the console window.

See also:

IRubricatorFactorDependenciesLookup