IRdsDictionary.DefaultElementKey

Syntax

DefaultElementKey: Integer;

Description

The DefaultElementKey property determines a default element by its key.

Comments

If the default element is not set, the property returns -1.

Example

Executing the example requires that the repository contains an MDM dictionary with the RDS_DICT_OBJ identifier. The key of one of the elements is equal to 11.

Add links to the Metabase, Rds system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Obj: IMetabaseObject;
    Dict: IRdsDictionary;
Begin
    
// Get current repository
    MB := MetabaseClass.Active;
    
// Get MDM dictionary
    Obj := MB.ItemById("RDS_DICT_OBJ").Edit;
    Dict := Obj 
As IRdsDictionary;
    
// Set default element key
    Dict.DefaultElementKey := 11;
    
// Save dictionary
    Obj.Save;
End Sub UserProc;

After executing the example the element with the 11 key is set as a default element in the dictionary.

See also:

IRdsDictionary