PrimaryIndex: IStandardDimIndex;
The PrimaryIndex property returns primary index for table dictionary.
Sub Main;
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 Main;
After executing the example the "s" variable contains the primary index ID, if it exists. Table dictionary identifier: TAB_DIM.
See also: