DisplayAttributeValueO(Element: Integer; Attribute: IDimAttributeInstance): Variant;
DisplayAttributeValueO[Element: UInteger; Attribute: IDimAttributeInstance]: Object;
Element - element index.
Attribute - the attribute whose displayed value is to be obtained.
The DisplayAttributeValueO property returns displayed value of element attribute. Element index and attribute are passed by the Element and Attribute parameters respectively.
This property is relevant if the DisplayDifferentValue property returns True for the current attribute.
Executing the example requires an MDM repository with the NSI_1 identifier. This repository contains an MDM dictionary with the Dict_1 identifier. An attribute with the LINKATTR identifier is created in the dictionary. This attribute is used to establish links with other MDM repositories.
Sub UserProc;
Var
MB: IMetabase;
DictInst: IDimInstance;
Attr: IDimAttributeInstance;
Elems: IDimElements;
Elem: Integer;
Begin
MB := MetabaseClass.Active;
DictInst := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Open(Null) As IDimInstance;
Attr := DictInst.Attributes.FindById("LINKATTR");
If Attr.DisplayDifferentValue Then
Elems := DictInst.Elements;
For Elem := 0 To Elems.Count - 1 Do
Debug.WriteLine("Actual value: " + Elems.AttributeValueO(Elem, Attr)
+ "; Displayed value: " + Elems.DisplayAttributeValueO(Elem, Attr));
End For;
End If;
End Sub UserProc;
Executing the example checks displayed value for the LINKATTR attribute. If displayed value does not match actual attribute value, development environment console displays both values for all elements.
See also: