IStandardDimIndex.UseInSelection

Fore Syntax

UseInSelection: Boolean;

Fore.NET Syntax

UseInSelection: Boolean;

Description

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

Comments

Available values:

Fore 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Dimensions;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Dim: IStandardDimension;
    Indexes: IStandardDimIndexes;
    Index: IStandardDimIndex;
    Attrs: IStandardDimAttributes;
    Attr: IStandardDimAttribute;
Begin
    // Get current repository
    mb := Params.Metabase;
    // 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.ddtString;
    // 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;

See also:

IStandardDimIndex