IStandardDimIndexes.PrimaryIndex

Syntax

PrimaryIndex: IStandardDimIndex;

Description

The PrimaryIndex property returns primary index for table dictionary.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Dim: IStandardDimension;
    DimInds: IStandardDimIndexes;
    DimIndex: IStandardDimIndex;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    Dim:=MB.ItemById("TAB_DIM").Bind As IStandardDimension;
    DimInds:=Dim.Indexes;
    If DimInds.Count<>0 Then
        DimIndex:=DimInds.PrimaryIndex;
        If DimIndex<>Null Then
            s:=DimIndex.Name;
        End If;
    End If;
End Sub UserProc;

After executing the example the "s" variable contains the primary index ID, if it exists. Table dictionary identifier: TAB_DIM.

See also:

IStandardDimIndexes