Product Administration Guide > Customizable Product Scripts >

Cfg_ChildItemChanged 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 quantities have changed.

This event is also called if the user changes an item's quantity 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 quantity, 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.

This event does not return items for which only attribute values have changed. For example, if the total number of 100 GB disk drives in a solution changes, this event returns a property set containing the 100 GB disk drive because the item quantity changed.

If the user enters or selects 10 feet as the desired value of the length attribute for power supply wiring, the returned property set does not contain power supply wiring since this is an attribute change.

In the selection pages for a customizable product, this event is called when the user selects an item. It is also called when the user increases or decreases the quantity of an item. This event is called before the Cfg_ItemChanged event.


Cfg_ChildItemChanged (ChangedItem as Property Set)

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

<ChangedItem ObjName= "objname" OldQty= "oldqty"
NewQty= "newqty"/>

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



String. The item name.


String. The item quantity prior to the request.


String. The new baseline item quantity.

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.



Use this event to determine what changes have been made to products in the solution and to submit additional requests as needed. For example, you could track the memory requirements for software the user selects and submit requests to add the correct amount of RAM to a computer configuration.

When you submit a request that changes item quantities, the submission causes the event to be called and the script runs again. Be sure to insert logic in the script that prevents an infinite loop of request submissions.


The following Siebel Visual Basic example writes to a file the item name, the old quantity, and the new quantity of all the items whose quantities change in each solution.

Sub Cfg_ChildItemChanged (ChangedItem As PropertySet)
   dim psItem as PropertySet
   dim n as Integer
   dim nCnt as Integer
   dim sObjName as String
   dim sOldQty as String
   dim sNewQty as String
   dim sMsg as String
   dim hndl as Long

   hndl = Freefile
   REM use a relative path to open cfgtest.log
   Open "..\cfgtest.log" for append as #hndl
   nCnt = ChangedItem.GetChildCount()
   For n = 0 to (nCnt -1)
      set psItem = ChangedItem.GetChild(n)
      With psItem
         sObjName = .GetProperty("ObjName")
         sOldQty = .GetProperty("OldQty")
         sNewQty = .GetProperty("NewQty")
      End With
      sMsg = "ObjName = " & sObjName
sMsg = sMsg & "; OldQty = " & sOldQty
sMsg = sMsg & "; NewQty = " & sNewQty
      Write #hndl, sMsg
      set psItem = Nothing
   Close #hndl
End Sub

Product Administration Guide