GetChild Method for a Property Set

The GetChild method returns the index number of a child property set.

Format

oPropSet.GetChild(index)

The following table describes the arguments for the GetChild method.

Argument Description

index

An integer that identifies the index number of the child property set that Siebel CRM must return.

How Siebel CRM Handles Indexing for Child Property Sets

Note how Siebel CRM handles indexing for a child property set you add, insert, or remove:

  • If Siebel CRM creates a child property set, then it creates an index number for this child property set, starting at 0 (zero). It increments this index for each child property set it adds to a given parent property set.

  • If you use the AddChild Property method, then Siebel CRM uses the next available index number for the child property set it adds.

  • If you use the InsertChildAt method, then Siebel CRM inserts the new child property set at a specified index. It also increases the index by 1 for the property set that the new child displaces, and for all child property sets that occur after the displaced property set.

  • If you use the RemoveChild method, then Siebel CRM removes the child property set you specify, and then decreases the index by 1 for all property sets that follow the removed child.

Used With

Browser Script, COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

Examples

The following Siebel eScript example sets the Name property of child property sets to the same value:

function Test1_Click ()
{
   var Account = TheApplication().NewPropertySet();
   var Opportunity = TheApplication().NewPropertySet();
   var Contact = TheApplication().NewPropertySet();
   var Activity = TheApplication().NewPropertySet();
   var j;

   Account.AddChild(Opportunity);
   Account.AddChild(Contact);
   Account.AddChild(Activity);

   for (var i = 0; i < Account.GetChildCount(); i++)
   {
      j = Account.GetChild(i);
      j.SetProperty('Name', 'Allied Handbooks');
   }
}

Related Topics

For more information, see the following topics: