Product Administration Guide > Customizable Product Scripts >

Cfg_AttributeChanged Event

After a user request is processed and the eConfigurator engine computes a new solution, this event is called for the product root. The event returns a property set containing all the products whose attributes have changed.

This event is also called if the user changes an item's attribute and the Request Conflict dialog box displays:

  • If the user selects OK in the dialog box, this submits a request that reverses the last request. Since this revises the item's baseline attribute value, the event is called for the item.
  • If the user selects Cancel, previous conflicting requests are removed from the session. Since the current baseline values do not require revision, the event is not called for the item.

In the selection pages for a customizable product, this event is called when the user enters or changes an attribute value.


Cfg_AttributeChanged (ChangedAttribute as Property Set)

The ChangedAttribute argument is passed as type PropertySet. This is a named XML element:

<Id ObjName ="objname">

<AttName = "attribute name" OldVal= "old value"
NewVal= "newvalue">



The properties of this XML element are defined in the following table:



String. The item name.


String. The attribute name.


String. The attribute value prior to the request.


String. The new baseline attribute value.


String. The object ID of the item whose attribute value has changed.

Several Siebel API-related methods are needed to read data from the property set:

  • GetChildCount(). Returns the total number of changed items in the property set. Use this method to set the counter for a while-loop that reads the property set.
  • GetChild(n). Returns the nth record in the property set. Use this method within a while-loop to read records from the property set.
  • GetProperty("argument"). Returns the value of argument. Allowed arguments are ObjName, OldQty, and NewQty. Arguments must be in quotes. Use this method to read the property values from each record in the property set.
  • GetType(). Retrieves the object ID of the item for which the attribute was changed.



Use this event to determine what changes have been made to product attributes in the solution and to submit additional requests as needed. For example, you could track the attributes selected for a product and submit requests based on them.


The following example, writes to a file the item name, the old attribute value, and the new attribute value of all the items whose attribute values change in each solution.

var item;
var log = Clib.fopen("c:\\attchgd.log", "a");

var id = ChangedAttribute.GetType();
   Clib.fputs(id, log);

   var nCnt = ChangedAttribute.GetChildCount();
   Clib.fputs(nCnt, log);

   for ( var i = 0; i<ChangedAttribute.GetChildCount(); i++ )

      item = ChangedAttribute.GetChild(i);
      var attName = item.GetType();
      var oldV = item.GetProperty("OldVal");
      var newV = item.GetProperty("NewVal");
      var s = "AttName = " + attName;
      s = s + "; OldVal = ";
      s = s + oldV;
      s = s + "; NewVal = ";
      s = s + newV;
      Clib.fputs(s, log);

Product Administration Guide