IStandardDimIndex.UseInSelection

Syntax

UseInSelection: Boolean;

Description

The UseInSelection property determines whether index is used on forming selection.

Comments

Available values:

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 Dal, Dimensions, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Dim: IStandardDimension;
    Indexes: IStandardDimIndexes;
    Index: IStandardDimIndex;
    Attrs: IStandardDimAttributes;
    Attr: IStandardDimAttribute;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get dictionary
    Dim := mb.ItemById("SELECTION_INDEX").Edit As IStandardDimension;
    // Get dictionary indexes
    Indexes := Dim.Indexes;
    // Add new index
    Index := Indexes.Add;
    // Set its name
    Index.Name := "Index to generate selection";
    // Get dictionary attributes
    Attrs := Dim.Attributes;
    // Add new attribute
    Attr := Attrs.Add;
    // Set its parameters
    Attr.Name := "Attribute for index";
    Attr.DataType := DbDataType.String;
    // Determine that created attribute will be used by new index
    Index.Attributes.Add(Attr);
    // Determine that index is case-sensitive
    Index.CaseSensitive := True;
    // Determine that index is used to generate selection
    Index.UseInSelection := True;
    // Save changes
    (Dim As IMetabaseObject).Save;
End Sub UserProc;

After executing the example index which can be used to store and restore selection by dimension based on this dictionary will be created in the MDM table dictionary.

See also:

IStandardDimIndex