IRubricatorInstance.GetFactData

Syntax

GetFactData(
    FactorKey: Integer;
    [Options: DictionaryGetDataOptions = 0]
    ): IRubricatorFactData;

Parameters

FactorKey. Factor key.

Options. Parameter of getting data. Optional parameter. Default value - DictionaryGetDataOptions.None - getting data for reading.

Description

The GetFactData method returns data of time series dictionary by factor key.

Comments

If Options = DictionaryGetDataOptions.Create or Options = DictionaryGetDataOptions.Edit, that is, the data is created or edited, the revision must be created. To create a revision, use the IRubricatorInstance.OpenRevision method.

Example

Executing the example requires a time series database with the TSDB identifier containing the factor with the "1" key.

Add links to the Metabase, Cubes system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    RubrIn: IRubricatorInstance;
    FactD: IRubricatorFactData;
Begin
    MB := MetabaseClass.Active;
    RubDesc := MB.ItemById("TSDB");
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    FactD := RubrIn.GetFactData(1);
    If FactD.IsEdited
        Then Debug.WriteLine("The factor is available for editing");
        Else Debug.WriteLine("The factor is read-only");
    End If;
End Sub UserProc;

After executing the example the console window displays the information whether the factor with the 1 key is available for editing.

See also:

IRubricatorInstance