FactorKey: Integer;
The FactorKey property returns time series key.
Executing the example requires a time series database with the OBJ_RUBRICATOR identifier. The time series with the 94173 key exists in this database.
Sub UserProc;
Var
MB: IMetabase;
RubrIn: IRubricatorInstance;
FactD: IRubricatorFactData;
RubRev: IRubricatorRevision;
Begin
MB := MetabaseClass.Active;
RubrIn := MB.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;
RubRev := RubrIn.OpenRevision("Test_Revision");
FactD := RubrIn.GetFactData(94173, DictionaryGetDataOptions.Edit);
FactD.CalendarLevel := DimCalendarLevel.Year Or DimCalendarLevel.Quarter;
FactD.Units := 3436;
Debug.WriteLine("Name of the current revision: " + FactD.Revision.Name);
Debug.WriteLine("Key of the revision, in which an indicator is created:"+FactD.RevisionKey.ToString); Debug.WriteLine("Indicator key:"+FactD.FactorKey.ToString); Debug.WriteLine("Name: " + FactD.RecordName);
Debug.WriteLine("Import object key: " + FactD.ObjectKey.ToString);
FactD.SaveAndRevise(SaveRubricatorDataOptions.NoRevise);
End Sub UserProc;
After executing the example calendar frequency and measurement units are changed for the specified time series. Information about the indicator is displayed in the console window.
See also: