IDimIndexesInstance.SelectionIndex

Syntax

SelectionIndex: IDimIndexInstance;

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 UseProc;
Var
    mb: IMetabase;
    DimInst: IDimInstance;
    Indexes: IDimIndexesInstance;
    Index: IDimIndexInstance;
    Attr: IDimAttribute;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get dictionary
    DimInst := mb.ItemById("USE_IN_SELECTION").Open(NullAs IDimInstance;
    // Get dictionary indexes
    Indexes := DimInst.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.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.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:

IDimIndexesInstance