IRdsAttributesInstance.Item

Syntax

Item(Index: Integer): IRdsAttributeInstance;

Parameters

Index - attribute index.

Description

The Item property returns an attribute of a dictionary, which index is passed by the Index parameter.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.

Sub Main;

Var

MB: IMetabase;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

AttrsInst: IRdsAttributesInstance;

AttrInst: IRdsAttributeInstance;

i: Integer;

Begin

MB := MetabaseClass.Active;

Dict := MB.ItemByIdNamespace("DICT_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;

DictInst := Dict.Open(Null) As IRdsDictionaryInstance;

AttrsInst := DictInst.Attributes;

For i := 0 To AttrsInst.Count - 1 Do

AttrInst := AttrsInst.Item(i);

Debug.Write(Attribute: + AttrInst.Name);

If AttrInst.HasReadAccess Then

Debug.Write(; Available access on reading);

Else

Debug.Write(; Unavailable access on reading);

End If;

If AttrInst.HasWriteAccess Then

Debug.Write(; Available access on writing;);

Else

Debug.Write(; Unavailable access on writing;);

End If;

Debug.WriteLine("");

End For;

End Sub Main;

After executing the example a list of attributes available in the MDM dictionary is displayed in development environment console. Existence of read and write permissions is specified by each attribute for a current user.

See also:

IRdsAttributesInstance