IStandardDimIndexes.SelectionIndex

Syntax

SelectionIndex: IStandardDimIndex;

Description

The SelectionIndex property returns index that is used to generate selection.

Comments

The index is used to save and restore selection by dimension based on dictionary.

Example

Executing the example requires that repository contains table dictionary with the SELECTION_INDEX identifier. This dictionary must be used as dimension in time series database.

Add links to the Dimensions, Metabase system assemblies.

Sub UseProc;
Var
    mb: IMetabase;
    Dim: IStandardDimension;
    Indexes: IStandardDimIndexes;
    Index: IStandardDimIndex;
    Attr: IDimAttribute;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get dictionary
    Dim := mb.ItemById("SELECTION_INDEX").Bind As IStandardDimension;
    // Get dictionary indexes
    Indexes := Dim.Indexes;
    // Get index of the dictionary used to form selection
    Index := Indexes.SelectionIndex;
    // Display information about index to the console
    If Index <> Null Then
        Debug.WriteLine("Index name: " + Index.Name);
        Debug.WriteLine("Attributes in the index:");
        For Each Attr In Index.Attributes Do
            Debug.WriteLine("    " + Attr.Name);
        End For;
    End If;
End Sub UseProc;

After executing the example the console displays information about index used for selection creating if it is present in the dictionary.

See also:

IStandardDimIndexes