Current: IRubricatorFactorDependencyData;
The Current property returns the current record in the cursor that contains found data.
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;
Executing the example creates an object that finds dependencies in the time series database according to the specified conditions. Information about found dependencies is displayed in the console window.
See also: