IRdsNotConvertibleReasonDuplicatedId.DuplicatedId

Syntax

DuplicatedId: String;

DuplicatedId: string;

Description

The DuplicatedId property returns duplicate identifier.

Comments

To get object keys, use the IRdsNotConvertibleReasonDuplicatedId.Keys property.

Fore Example

Executing the example requires an MDM repository with the 16008 key that contains MDM dictionaries required to convert to table MDM dictionaries.

Add links to the Metabase, Rds system assemblies.

Sub UserProc;
Var
    RDS_DB: IRdsDatabase;
    Converter: IRdsDictionaryConverter;
    List: IRdsDictionaryConverterList;
    NotConv: IMetabaseObjectDescriptors;
    pReasons: IRdsNotConvertibleReasons;
    pReason: IRdsNotConvertibleReason;
    ReasonDuplicatedId: IRdsNotConvertibleReasonDuplicatedId;
    i, j, k: Integer;
Begin
    RDS_DB := MetabaseClass.Active.Bind(16008As IRdsDatabase;
    Converter := New RdsDictionaryConverter.Create;
    List := Converter.AllRdsDatabase(RDS_DB);
    NotConv := List.NotConvertibleDictionaries;
    For i := 0 To NotConv.Count - 1 Do
    pReasons := List.GetNotConvertibleReasons(NotConv.Item(i).Key);
        For j := 0 To pReasons.Count - 1 Do
            pReason := pReasons.Item(j);
            ReasonDuplicatedId := pReason As IRdsNotConvertibleReasonDuplicatedId;
            Debug.Write("Duplicate identifier: ");
            Debug.WriteLine(ReasonDuplicatedId.DuplicatedId);
            Debug.Write("Keys: ");
            For k := 0 To ReasonDuplicatedId.Keys.Length - 1 Do
                Debug.WriteLine(ReasonDuplicatedId.Keys[k]);
            End For;
        End For;
    End For;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Rds;

Public Shared Sub Main(Params: StartParams);
Var
    RDS_DB: IRdsDatabase;
    Converter: IRdsDictionaryConverter;
    List: IRdsDictionaryConverterList;
    NotConv: IMetabaseObjectDescriptors;
    pReasons: IRdsNotConvertibleReasons;
    pReason: IRdsNotConvertibleReason;
    ReasonDuplicatedId: IRdsNotConvertibleReasonDuplicatedId;
    i, j, k: Integer;
    Keys: System.Array;
Begin
    RDS_DB := Params.Metabase.Bind(16008As IRdsDatabase;
    Converter := New RdsDictionaryConverter.Create();
    List := Converter.AllRdsDatabase(RDS_DB);
    NotConv := List.NotConvertibleDictionaries;
    For i := 0 To NotConv.Count - 1 Do
    pReasons := List.GetNotConvertibleReasons(NotConv.Item[i].Key);
        For j := 0 To pReasons.Count - 1 Do
            pReason := pReasons.Item[j];
            ReasonDuplicatedId := pReason As IRdsNotConvertibleReasonDuplicatedId;
            System.Diagnostics.Debug.Write("Duplicate identifier: ");
            System.Diagnostics.Debug.WriteLine(ReasonDuplicatedId.DuplicatedId);
            System.Diagnostics.Debug.Write("Keys: ");
            For k := 0 To ReasonDuplicatedId.Keys.Length - 1 Do
                Keys := ReasonDuplicatedId.Keys;
                System.Diagnostics.Debug.WriteLine(Keys[k]);
            End For;
        End For;
    End For;
End Sub;

After executing the example the console window displays duplicate identifiers and corresponding object keys.

See also:

IRdsNotConvertibleReasonDuplicatedId