WhereIsEmpty: TriState;
WhereIsEmpty: Prognoz.Platform.Interop.ForeSystem.TriState;
The WhereIsEmpty property determines whether empty records are used in search.
Indicator of factor emptiness depends on a value of time series attribute Empty. Identifier of this attribute is defined in the IMetaDictionaryLookup.EmptyMarkAttribute property.
Available values of WhereIsEmpty:
TriState.OnOption. Search is executed only in empty records.
TriState.OffOption. Search is executed only in non-empty records.
TriState.Undefined. Default value. Search is executed in all records.
Executing the example requires a time series database with the FC_IS_EMPTY identifier. This database includes an indicator of empty factors. Add links to the Metabase, Cubes and Rds system assemblies.
Sub UserProc;
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
RubrIn: IRubricatorInstance;
DictInst: IMetaDictionaryInstance;
MetaDLookup: IMetaDictionaryLookup;
i: Integer;
Res: Array Of Integer;
Begin
MB := MetabaseClass.Active;
RubDesc := MB.ItemById("FC_IS_EMPTY");
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
DictInst := RubrIn.Facts;
MetaDLookup := DictInst.CreateLookup("");
MetaDLookup.EmptyMarkAttribute := "EMPT";
MetaDLookup.WhereIsEmpty := TriState.OnOption;
i := MetaDLookup.LookupKeys("FACTOR").Length;
Res := New Integer[i];
Res := MetaDLookup.LookupKeys("FACTOR");
For i := 0 To Res.Length - 1 Do
Debug.WriteLine(Res[i].ToString);
End For;
End Sub UserProc;
After executing the example keys of time series, for which an indicator of emptiness is assigned, are displayed in the console window.
Executing the example requires a time series database with the FC_IS_EMPTY identifier. This database has an indicator of empty factors.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Rds;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
RubDesc: IMetabaseObjectDescriptor;
RubrIn: IRubricatorInstance;
DictInst: IMetaDictionaryInstance;
MetaDLookup: IMetaDictionaryLookup;
i: Integer;
Res: System.Array;
Begin
MB := Params.Metabase;
RubDesc := MB.ItemById["FC_IS_EMPTY"];
RubrIn := RubDesc.Open(Null) As IRubricatorInstance;
DictInst := RubrIn.Facts;
MetaDLookup := DictInst.CreateLookup("");
MetaDLookup.EmptyMarkAttribute := "EMPT";
MetaDLookup.WhereIsEmpty := TriState.tsOnOption;
i := MetaDLookup.LookupKeys("FACTOR").Length;
Res := New Integer[i];
Res := MetaDLookup.LookupKeys("FACTOR");
For i := 0 To Res.Length - 1 Do
System.Diagnostics.Debug.WriteLine(Res[i].ToString());
End For;
End Sub;
After executing the example keys of time series, for which an indicator of emptiness is assigned, are displayed in the console window.
See also: