IMetaAttributesSet.Item

Syntax

Item(Index: Integer): IMetaAttribute;

Parameters

Integer - attribute index in a set.

Description

The Item property returns an attribute from the set by index.

Example

Executing the example requires that the repository contains a time series database with the OBJ_FC identifier and an MDM repository with the RDS_REPO identifier. The MDM repository must contain a dictionary with the DICT_CTR identifier.

Add links to the Metabase, Rds, Cubes system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Rubr: IRubricator;
    Facts: IMetaDictionary;
    Atts: IMetaAttributes;
    Attr: IMetaAttribute;
    SS: IMetaAttributesSubset;
    Rds: IMetabaseObjectDescriptor;
    i: Integer;
Begin
MB := MetabaseClass.Active;
    Rubr := MB.ItemById("OBJ_FC").Bind As IRubricator;
    Facts := Rubr.Facts;
    Atts := Facts.Attributes;
    SS := Atts.CreateSubset("KEY;REV", SubsetOperation.Select_);
    Rds := mb.ItemById("RDS_REPO");
    Attr := Atts.FindByValuesObject(MB.GetObjectKeyByIdNamespace("DICT_CTR", Rds.Key));
    If Attr <> Null Then
        SS.Add(Attr);
    End If;
    For i := 0 To SS.Count - 1 Do
        Debug.WriteLine(SS.Item(i).Name);
    End For;
End Sub UserProc;

After executing the example the set containing the KEY and REV attributes is created. If the time series database indicators have an attribute that refers to the DICT_CTR dictionary in the MDM repository, this attribute is also added to the set. Names of all attributes included in the set are displayed in the console window.

See also:

IMetaAttributesSet