DisplayDifferentValue: Boolean;
DisplayDifferentValue: Boolean;
The DisplayDifferentValue property determines whether the value, that is different from real attribute value, is displayed for the attribute.
If links are used in MDM dictionaries, displayed attribute values used for these links, may have data type that does not match type of attribute data. Type of displayed data depends on selected display format.
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;
DimInst: IDimInstance;
AttrInst: IDimAttributeInstance;
HInst: IDimHierarchyInstance;
Begin
MB := MetabaseClass.Active;
DimInst := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Open(Null) As IDimInstance;
AttrInst := DimInst.Attributes.FindById("LINKATTR");
If AttrInst.DisplayDifferentValue Then
Debug.WriteLine(AttrInst.DisplayDataType);
Debug.WriteLine(AttrInst.DisplayValue(0));
End If;
End Sub UserProc;
Executing the example checks displayed value for the LINKATTR attribute. If the displayed value does not match actual attribute value, type of displayed value and displayed value for the selected element are displayed in development environment console.
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.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
DimInst: IDimInstance;
AttrInst: IDimAttributeInstance;
HInst: IDimHierarchyInstance;
VType: Integer;
VDisplay: string;
Begin
MB := Params.Metabase;
DimInst := MB.ItemByIdNamespace["Dict_1", MB.ItemById["NSI_1"].Key].Open(Null) As IDimInstance;
AttrInst := DimInst.Attributes.FindById("LINKATTR");
If AttrInst.DisplayDifferentValue Then
VType := AttrInst.DisplayDataType As integer;
VDisplay := AttrInst.DisplayValue[0].ToString();
End If;
End Sub;
Executing the example checks displayed value for the LINKATTR attribute. If the displayed value does not match actual attribute value, the variables VType and VDisplay contain type of displayed value and displayed value for the selected element.
See also: