RevisionKey: Integer;
The RevisionKey property returns key of the revision, in which a time series is created.
Executing the example requires a time series database with the OBJ_RUBRICATOR identifier. This database contains a factor with the 94173 key.
Sub Main;
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("Current revision name: " + FactD.Revision.Name);
Debug.WriteLine("Revision key, in which time series is created: " + FactD.RevisionKey.ToString);
Debug.WriteLine("Factor key: " + FactD.FactorKey.ToString);
Debug.WriteLine("Name: " + FactD.RecordName);
Debug.WriteLine("Import object key: " + FactD.ObjectKey.ToString);
FactD.SaveAndRevise(SaveRubricatorDataOptions.NoRevise);
End Sub Main;
After executing the example calendar frequency and measurement units are changed for the factor with the 94173 key. The console window displays information about the factor.
See also: