IRubricatorFactData.SaveAndRevise

Syntax

SaveAndRevise(Options: SaveRubricatorDataOptions): Boolean;

Options

Options. Parameter of data saving.

Description

The SaveAndRevise method saves data of factor with the specified parameters. It returns True if data is saved to a new revision.

Example

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:

IRubricatorFactData