IDimIndex.UseInSelection

Syntax

UseInSelection: Boolean;

Description

The UseInSelection property returns the attribute whether index is used on creating the selection.

Comments

Available values:

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;
    // Look over dictionary indexes
    For Each Index In Indexes Do
        // If index is used for selection creation,
        // display to the console information about it
        If Index.UseInSelection 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 For;
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:

IDimIndex