Attribute.LookUpKey

Syntax

LookUpKey: Number;

Description

The LookUpKey property determines key of dictionary attribute binding to attribute of another MDM dictionary.

Comments

Use JSON or the setLookUpKey method to set the property value, and the getLookUpKey method to get the property value.

Example

To execute this example, the page must contain the DictionaryBox component named dictionaryBox (see Example of creating the DictionaryBox component ). Show the imported attribute with the ID UNITS_SYSTEM_DESCRIPTION in the MDM dictionary, and define key of the attribute, to which it is linked:

// Get MDM dictionary
var source = dictionaryBox.getSource()[0];
// Get borrowed attribute
var lookUpAttribute = source.getAttribute(null, "UNITS_SYSTEM_DESCRIPTION");
// Show the attribute
var attrs = source.getAttributes();
for (var i in attrs) {
    if (attrs[i].getKey() == lookUpAttribute.getKey()) {
        attrs[i].setVisible(true);
    };
};
console.log("Key of the lookup attribute for borrowed attribute: %s", lookUpAttribute.getLookUpKey());
// Refresh the tree of dictionary elements
dictionaryBox.getDataArea().getActiveDictTree().refreshAll();

After executing the example the dictionary shows borrowed attribute with the UNITS_SYSTEM_DESCRIPTION identifier:

The browser console shows key of the lookup attribute for borrowed attribute:

Key of the lookup attribute for borrowed attribute: 2174

See also:

Attribute