Product Administration Guide > Customizable Product Scripts >

SetAttribute Method

This method sets the value of an attribute for an item in the customizable product. This method can also be used to set attribute values for attributes of the customizable product. If multiple instances of an item have the same path, the eConfigurator engine randomly picks one instance and changes its attribute values.


SetAttribute (ObjPath, AttName, AttVal) as Integer



String. The full path of the component product. For attributes of the customizable product, specify the product root. Use product path syntax to specify the path.


String. The name of an attribute of the component product or customizable product.


String. The value to which you want to set the attribute.

For LOV domains, the AttValue must be one of the values in the list of values. Validation expressions defined for LOV domains are ignored.

For range of value domains, the AttValue must be within the domain defined by the validation expression.


Can be used only for component products within the customizable product.


Returns 1 if setting the attribute was successful. Returns 0 if setting the attribute failed.


For an example of using SetAttribute, see About Product Path.

Product Administration Guide