IStandardDimIndexAttributes.RemoveByKey

Syntax

RemoveByKey(AttributeKey: Integer): Boolean;

Parameters

AttributeKey. Attribute key.

Description

The RemoveByKey method removes dictionary attribute from the index by the first key that is passed by the AttributeKey parameter and returns True if it is successfully removed.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Dim: IStandardDimension;

DimInds: IStandardDimIndexes;

DimIndex: IStandardDimIndex;

DimIndAttrs: IStandardDimIndexAttributes;

s: String;

Begin

MB:=MetabaseClass.Active;

MObj:=MB.ItemById("TAB_DIM").Edit;

Dim:=MObj As IStandardDimension;

DimInds:=Dim.Indexes;

If DimInds.Count<>0 Then

DimIndex:=DimInds.Item(0);

DimIndAttrs:=DimIndex.Attributes;

If DimIndAttrs.RemoveByKey(4891) Then

s:="Remove";

Else

s:="Not remove";

End If;

End If;

MObj.Save;

End Sub Main;

After executing the example the "s" variable contains Remove if the attribute with key 4891 is successfully removed from the first dictionary index. Table dictionary identifier: TAB_DIM.

See also:

IStandardDimIndexAttributes