HasEmptyAttribute: Boolean;
The HasEmptyAttribute property determines whether factors are empty in a time series database.
Factor emptiness indicator depends on the value of the Empty factors attribute (the EMPT identifier).
Available values:
True. The database contains the Empty factors attribute.
False. Default value. The database does not contain the Empty factors attribute.
If all the values of the factor in database on actual revision are empty (absent or equal to Null), it is set as empty. A new factor is considered as empty until data is not saved to it.
To update emptiness indicator of factor, use the IRubricatorInstance.RegenerateEmpty method.
Executing the example requires a time series database with the FC_IS_EMPTY identifier. Add links to the Metabase and Cubes system assemblies.
Sub UserProc;
Var
mb: IMetabase;
RubObj: IMetabaseObject;
Rubr: IRubricator;
RubrInst: IRubricatorInstance;
FactsLookup: IRubricatorFactsLookup;
LookupRes: Array Of Integer;
Key: integer;
FactD: IRubricatorFactData;
Begin
mb := MetabaseClass.Active;
RubObj := mb.ItemById("FC_IS_EMPTY").Edit;
Rubr := RubObj As IRubricator;
If Not Rubr.HasEmptyAttribute Then
Rubr.HasEmptyAttribute := True;
RubObj.Save;
End If;
RubrInst := RubObj.Open(Null) As IRubricatorInstance;
RubrInst.RegenerateEmpty(Null);
FactsLookup := RubrInst.CreateFactsLookup;
FactsLookup.WhereIsEmpty := TriState.OnOption;
LookupRes := FactsLookup.LookupFactors;
If LookupRes <> Null Then
For Each Key In LookupRes Do
FactD := RubrInst.GetFactData(Key);
Debug.WriteLine(Key = + Key.ToString + Mnemonic = + FactD.Mnemo);
End For;
Else
Debug.WriteLine(Time series are not found);
End If;
End Sub UserProc;
After executing the example the indicator of time series emptiness is added to the time series database, and the value of this indicator is refreshed. Keys and mnemonics of empty factors are displayed in the console window.
See also: