GetFactData(
FactorKey: Integer;
[Options: DictionaryGetDataOptions = 0]
): IRubricatorFactData;
FactorKey. Factor key.
Options. Parameter of getting data. Optional parameter. Default value - DictionaryGetDataOptions.None - getting data for reading.
The GetFactData method returns data of time series dictionary by factor key.
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.
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(Null) As 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: