IDimIndexInstance.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;
    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;
    // 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.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 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:

IDimIndexInstance