IRdsCompoundDictionarySource.Source

Syntax

Source: IRdsDictionary;

Description

The Source property determines the MDM dictionary used as data source for this composite dictionary.

Example

Executing the example requires the MDM repository NSI_1. This repository contains two dictionaries: 1) standard MDM dictionary with the Dict_1 identifier; 2) composite MDM dictionary with the CompDict_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    CompDict: IRdsCompoundDictionary;
    CompSources: IRdsCompoundDictionarySources;
    CompSource: IRdsCompoundDictionarySource;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemByIdNamespace("CompDict_1", MB.ItemById("NSI_1").Key).Edit;
    Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;
    CompDict := MObj As IRdsCompoundDictionary;
    CompSources := CompDict.Sources;
    CompSource := CompSources.Add;
    CompSource.Id := "New_Source";
    CompSource.Name := "New source dictionary";
    CompSource.Source := Dict;
    MObj.Save;
End Sub UserProc;

After executing the example a new source is added into a composite dictionary. The MDM dictionary Dict_1 is data source.

See also:

IRdsCompoundDictionarySource