The Attribute Related binds allow access to the selected object or value. Many binds can be attribute related, however the binds listed below are available after selecting the 'Attribute Related' option within the 'Binds to' dropdown, as shown below.
Each bind is defined in the sections below.
Configuration
To use any bind:
Note: Example scripts should not be used as-is without thorough testing, including updating the script to match object and link types that exist on your system
The selected attribute is bound to the variable.
In this example, the Variable Name is 'eanAttribute', the Binds to field is Attribute, and the Parameters field displays the EAN attribute. The following JavaScript returns the ID of the EAN attribute as an Info log message:
var bindDemo = eanAttribute.getID();
log.info("Attribute ID is " + bindDemo);

The selected attribute group is bound to the variable.
In this example, the Variable Name is 'displayAttrGroup', the Binds to field is Attribute Group, and the Parameters field shows the Display attribute. The following JavaScript returns the ID of the Display attribute group as an Info log message:
var bindDemo = displayAttrGroup.getID();
log.info("Attribute Group ID is " + bindDemo);
For more information, see the Parameterized Business Actions in Web UI section of the Web UI Getting Started documentation
The value of the selected attribute is bound directly as a String variable. Primarily used for Web UI live validation of conditions and when defining Match Codes.
Note: This variable also works in the Web UI.
In this example, the Variable Name is 'primaryColorAttrValue', the Binds to field is Attribute Value, and the Parameters field displays the Primary Color attribute.
return primaryColorAttrValue == "Gray" ? true : "Primary Color is " + primaryColorAttrValue + " but it should be Gray.";
The selected LOV (called 'Domain' in the workbench) is bound to the action or condition variable.
For example, to add one more color 'violet' to the 'Colors' LOV.
//lov =Bindes to List of Values
//node= Current Object
lov.createListOfValuesValue("violet",null ,node.getID());
The selected unit is bound to the action or condition variable.
For example, to add one more size 5 cm to the 'Size' LOV.
//lov= Binds to List of Values
//node=Current object
//unit= Select the unit which you want to bind (cm, m , g/cm^2 etc)
lov.createListOfValuesValue(5, unit ,node.getID());
The selected unit group is bound to the action or condition variable.
2018, Stibo Systems