IUserDimIndex.Primary

Syntax

Primary: Boolean;

Description

The Primary property determines whether the index is primary.

Example

Sub UserProc;
Var
    MB: IMetabase;
    UsDim: IUserDimension;
    UsDimInds: IUserDimIndexes;
    UsDimIndex: IUserDimIndex;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    UsDim:=MB.ItemById("USER_DIM").Bind As IUserDimension;
    UsDimInds:=UsDim.Indexes;
    If UsDimInds.Count<>0 Then
        UsDimIndex:=UsDimInds.Item(0);
        If UsDimIndex.Primary Then
            s:="Primary";
        Else
            s:="Not primary";
        End If;
    End If;
End Sub UserProc;

After executing the example the "s" variable shows Primary if the first dictionary index is a primary one. Calculated dictionary identifier - USER_DIM.

See also:

IUserDimIndex