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 Siebel Product Configurator engine randomly picks one instance and changes its attribute values. Users can reference a particular instance of a product by using $Int.[<id>] to specify the integration id in the product path.
Syntax
SetAttribute (ObjPath, AttName, AttValue) as Integer
The following table explains the arguments in this syntax.
Argument | Description |
---|---|
ObjPath |
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. |
AttName |
String. The name of an attribute of the component product or customizable product. |
AttValue |
String. The value to which you want to set the attribute. |
LICflag |
Optional input. String. This property is applicable for LOV Domains. It specifies whether the value passed to the method is the LOV display value or the LOV language independent code (LIC). Set it to 'Y' if you are supplying the LIC value. |
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.
Items
Can be used only for component products within the customizable product.
Returns
Returns 1 if setting the attribute was successful. Returns 0 if setting the attribute failed.
Example
For an example of using SetAttribute, see About Product Path in Siebel Product Configurator Scripts.