Show contents 

Cubes > Cubes Assembly Interfaces > IRubricator > IRubricator.HasEmptyAttribute

IRubricator.HasEmptyAttribute

Syntax

HasEmptyAttribute: Boolean;

Description

The HasEmptyAttribute property determines whether indicators are empty in a time series database.

Comments

Indicator emptiness attribute depends on the value of the Empty indicators attribute (the EMPT identifier).

Available values:

If all the values of the indicator in database on actual revision are empty (absent or equal to Null), it is set as empty. A new indicator is considered as empty until data is not saved to it.

To update emptiness attribute of indicator, use the IRubricatorInstance.RegenerateEmpty method.

Example

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(NullAs 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 indicators are displayed in the console window.

See also:

IRubricator