IDimIndexes.SelectionIndex

Syntax

SelectionIndex: IDimIndex;

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 the repository contains MDM dictionary with the USE_IN_SELECTION identifier. This dictionary must be out of MDM repository and must be used only as dimension in time series database.

Add links to the Dimensions, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    DimModel: IDimensionModel;
    Indexes: IDimIndexes;
    Index: IDimIndex;
    Attr: IDimAttribute;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get dictionary
    DimModel := mb.ItemById("USE_IN_SELECTION").Bind As IDimensionModel;
    // Get dictionary indexes
    Indexes := DimModel.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(Index.CaseSensitive ? "Index is case-sensitive" : "Index is not case-sensitive");
        Debug.WriteLine("Attributes in the index:");
        For Each Attr In Index.Attributes Do
            Debug.WriteLine("    " + Attr.Name);
        End For;
    End If;
End Sub UserProc;

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

See also:

IDimIndexes