IDimAttribute.DisplayDataDomain

Fore Syntax

DisplayDataDomain: DbDataDomain;

Fore.NET Syntax

DisplayDataDomain: Prognoz.Platform.Interop.Dal.DbDataDomain;

Description

The DisplayDataDomain property returns type of multibyte information displayed in the attribute.

Comments

To get data type in order to save multibyte information in the attribute, use the IDimAttribute.DataDomain property.

Fore Example

Executing the example requires that repository contains table MDM dictionary with the TMDMDICT_MEMO identifier.

To execute the example, add links to the Dal, Dimensions, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    dimension: IDimensionModel;
    attribute: IDimAttribute;
    attributes: IDimAttributes;
    i: Integer;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get table MDM dictionary
    dimension := mb.ItemById("TMDMDICT_MEMO").Bind As IDimensionModel;
    // Get dictionary attributes
    attributes := dimension.Attributes;
    // Parse obtained attributes
    For i := 0 To attributes.Count - 1 Do
        attribute := attributes.Item(i);
        // If attribute displays data of the Long Text type, display information about it
        If (attribute.DisplayDataDomain = DbDataDomain.Memo) And
            (attribute.DataType = DbDataType.String) Then
            Debug.WriteLine("Name: " + attribute.Name);
            Debug.WriteLine("Identifier: " + attribute.Id);
            Debug.WriteLine("Key: " + attribute.Key.ToString);
        End If;
    End For;
End Sub UserProc;

After executing the example the console window displays information about the Long Text attributes, if they are present in the MDM dictionary.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Dimensions;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    dimension: IDimensionModel;
    attribute: IDimAttribute;
    attributes: IDimAttributes;
    i: Integer;
Begin
    // Get current repository
    mb := Params.Metabase;
    // Get table MDM dictionary
    dimension := mb.ItemById["TMDMDICT_MEMO"].Bind() As IDimensionModel;
    // Get dictionary attributes
    attributes := dimension.Attributes;
    // Parse obtained attributes
    For i := 0 To attributes.Count - 1 Do
        attribute := attributes.Item[i];
        // If attribute displays data of the Long Text type, display information about it
        If (attribute.DisplayDataDomain = DbDataDomain.dddMemo) And
            (attribute.DataType = DbDataType.ddtString) Then
            System.Diagnostics.Debug.WriteLine("Name: " + attribute.Name);
            System.Diagnostics.Debug.WriteLine("Identifier: " + attribute.Id);
            System.Diagnostics.Debug.WriteLine("Key: " + attribute.Key.ToString());
        End If;
    End For;
End Sub;

See also:

IDimAttribute