Siebel Object Interfaces Reference > Siebel Object Interfaces Reference > Object Interfaces Reference >

Property Set Methods


This topic describes property set methods. It includes the following topics:

In this topic, the oPropSet variable indicates the variable that contains a property set.

AddChild Method for a Property Set

The AddChild method adds a child property set to a property set. This method returns an integer that indicates the index of the child property set.

Format

oPropSet.AddChild(childPropSet)

Table 95 describes the arguments for the AddChild method.

Table 95. Arguments for the AddChild Method
Argument
Description

childObject

A property set that Siebel CRM must make as a child to the property set that the oPropSet variable identifies.

Usage

You can use a property set to create a tree data structure. You can add any number of arbitrarily structured child properties to a property set. You can use a child property set to structure a property set in a manner that is similar to the structure that the data model uses. For example, a parent account property set can include child property sets for opportunities, contacts, activities, and so forth. In this example, you could create an independent property set named Opportunity, where accounts, contacts, and activities can be children.

If Siebel CRM creates an instance of a property set through script, and then adds it to a parent property set, and if the parent property set is subsequently released, then Siebel CRM does not release this child instance. The reference to the child instance exists independently.

Used With

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

Examples

The following fragment of Siebel eScript code adds child property sets to a parent property set:

   var Account = TheApplication().NewPropertySet();
   var Opportunity = TheApplication().NewPropertySet();
   var Contact = TheApplication().NewPropertySet();
   var Activity = TheApplication().NewPropertySet();

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

Related Topics

For more information, see the following topics:

Copy Method for a Property Set

The Copy method returns a copy of a property set.

Format

oPropSet.Copy()

No arguments are available.

Usage

The Copy method creates a copy of a property set, including any properties and child property sets. Siebel CRM typically passes a property set through a reference, so making a copy allows you to manipulate a property set without affecting the original property set.

Used With

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

Examples

The following Siebel VB example uses a copy of a property set to store the original values of the properties, and displays the original and Pig-Latin forms of the properties:

(general)
(declarations)
Option Explicit

Function PigLatin (Name1 As String) As String
   Dim Name2 As String, FirstLetter As String
   Name2 = Right$(Name1, len(Name1) - 1)
   FirstLetter = Left$(Name1, 1)
   Name2 = UCase(Mid$(Name1, 2, 1)) & _
      Right$(Name2, Len(Name2) - 1)
   Name2 = Name2 & LCase(FirstLetter) & "ay"
   PigLatin = Name2
End Function

Sub ClickMe_Click()

   Dim Inputs As PropertySet, Outputs As PropertySet
   Dim message As String, propName, propVal, newPropVal
   set Inputs = TheApplication.NewPropertySet

   Inputs.SetProperty "Name", "Harold"
   Inputs.SetProperty "Assistant", "Kathryn"
   Inputs.SetProperty "Driver", "Merton"

   set Outputs = Inputs.Copy()

   propName = Outputs.GetFirstProperty()
   do while propName <> ""
      propVal = Outputs.GetProperty(propName)
      newPropVal = PigLatin(propVal)
      Outputs.SetProperty propName, newPropVal
      message = message & propVal & " has become " & _
         newPropVal & Chr$(13)
      propName = Outputs.GetNextProperty()
   loop
   TheApplication.RaiseErrorText message

Set message = Nothing
Set Outputs = Nothing
Set Inputs = Nothing

End Sub

GetByteValue Method for a Property Set

The GetByteValue method returns the following information:

  • If a byte value is set, then this method returns a byte array.
  • If a string value is set, then this method returns a null value.

For more information, see SetByteValue Method for a Property Set.

Format

oPropSet.getByteValue()

No arguments are available.

Used With

Siebel Java Data Bean

Examples

The following example uses a binary value as input and provides a binary output. The angle brackets (< >) indicate a variable:

SiebelPropertySet input = new SiebelPropertySet();
SiebelPropertySet output = new SiebelPropertySet();

input.setProperty("ProcessName", "LMS3 Jason");

// XML to send
String str="<?xml version=\"1.0\" encoding=\"UTF8\" ?><GetCommunicationDataInput><MemberID>20048963</MemberID></GetCommunicationDataInput>";

// convert string to byte array
byte [] bvalue = new String(str).getBytes();

input.setByteValue(bvalue);
businessService.invokeMethod("RunProcess",input,output);

// Use getByteValue to return the value..and pop it in a String..for example
String out2 = new String (output.getByteValue());
System.out.println(out2);

GetChild Method for a Property Set

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

Format

oPropSet.GetChild(index)

Table 96 describes the arguments for the GetChild method.

Table 96. Arguments for 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, Web Client Automation Server

If you use the Web Client Automation Server, then the child object that Siebel CRM returns is a copy of the object. Siebel CRM updates any modifications that occur to the object that it returns, but it does not update the originating object.

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:

GetChildCount Method for a Property Set

The GetChildCount method returns the number of child property sets that exist for a parent property set.

Format

oPropSet.GetChildCount()

No arguments are available.

Usage

The GetChildCount method returns the number of child property sets for the property set that the oPropSet variable identifies. The index number for child property sets start at 0, so a child count of 3 indicates that there are child property sets at indexes 0, 1, and 2.

The GetChildCount method returns only the number of direct descendants. If a child property set includes children, then Siebel CRM does not include these grandchildren in the count that it provides in the return value.

Used With

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

Examples

For an example, see GetChild Method for a Property Set.

GetFirstProperty Method for a Property Set

The GetFirstProperty method for a property set returns a string that contains the name of the first property in a property set.

Format

oPropSet.GetFirstProperty()

No arguments are available.

Usage

The usage for the GetFirstProperty method for a property set is similar to the usage for the GetFirstProperty method for a business service. For more information, see Usage for a Method that Gets a Business Service Property.

Used With

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

Examples

The following example uses the GetFirstProperty method to get the first property, and then uses the GetNextProperty method to return all subsequent properties. If the GetNextProperty method returns a null value, then Siebel CRM terminates the loop:

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
   var propName = "";
   var propVal = "";

   propName = Inputs.GetFirstProperty();

   // stay in loop if the property name is not an empty string
   while (propName != "") {
      propVal = Inputs.GetProperty(propName);

      // if a property with the same name does not exist
      // add the name value pair to the output
      if (!Outputs.PropertyExists(propName)) {
         Outputs.SetProperty(propName, propVal);
      }

      propName = Inputs.GetNextProperty();

   }
   return (CancelOperation);
}

Related Topics

For more information, see the following topics:

GetLastErrCode Method for a Property Set

The GetLastErrCode method returns the error code for the error that Siebel CRM logged most recently. This code is a short integer. 0 (zero) indicates no error.

Format

oPropSet.GetLastErrCode

No arguments are available.

Usage

For more information, see Usage for the GetLastErrCode Method.

Used With

Mobile Web Client Automation Server, Web Client Automation Server

GetLastErrText Method for a Property Set

The GetLastErrText method returns a string that contains the text message for the error that Siebel CRM logged most recently.

Format

oPropSet.GetLastErrText

No arguments are available.

Usage

For more information, see Usage for the GetLastErrText Method.

Used With

Mobile Web Client Automation Server, Web Client Automation Server

GetNextProperty Method for a Property Set

The GetNextProperty method returns a string that contains the name of the next property of a property set. If no more properties exist, then this method returns an empty string.

Format

oPropSet.GetNextProperty()

No arguments are available.

Usage

Usage for the GetNextProperty method for a property set is similar to the usage for the GetNextProperty method for a business service. For more information, see Usage for the GetNextProperty Method.

Used With

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

Examples

For an example, see GetFirstProperty Method for a Property Set.

Related Topics

For more information, see the following topics:

GetProperty Method for a Property Set

The GetProperty method returns a string that contains the value of a property. If the property does not exist, then this method returns NULL.

Format

oPropSet.GetProperty(propName)

The arguments you can use with this format are the same as the arguments described in Table 83.

Used With

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

Examples

The following fragment of Siebel eScript code receives a set of input properties used with the Shipping Engine business service described in Service_PreInvokeMethod Event:

var sShipper = Inputs.GetProperty("Shipping Company");
var dWeight = Val(Inputs.GetProperty("Weight"));
var dSize = Val(Inputs.GetProperty("Total Dimensions"));
var iZone = Val(Inputs.GetProperty("Zone"));

Related Topics

For more information, see the following topics:

GetPropertyCount Method for a Property Set

The GetPropertyCount method returns the number of properties that exist in the current level in the hierarchy. It does not return all properties in the entire property set hierarchy.

Format

oPropSet.GetPropertyCount

No arguments are available.

Used With

Browser Script, COM Data Control, COM Data Server, Mobile Web Client Automation Server, Server Script, Web Client Automation Server

GetType Method for a Property Set

The GetType method returns a string that contains the value of the type attribute of a property set.

Format

oPropSet.GetType

No arguments are available.

Used With

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

Related Topics

For more information, see the following topics:

GetValue Method for a Property Set

The GetValue method returns a string that contains the value of the value attribute of a property set.

Format

oPropSet.GetValue

No arguments are available.

Used With

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

Related Topics

For more information, see the following topics:

InsertChildAt Method for a Property Set

The InsertChildAt method inserts a child property set in a parent property set at a specific location. This method does not return any information. For more information, see AddChild Method for a Property Set.

Format

oPropSet.InsertChildAt childObject, index

Table 97 describes the arguments for the InsertChildAt method.

Table 97. Arguments for the InsertChildAt Method
Argument
Description

childObject

The property set that Siebel CRM must make a child. It makes this property set a child of the property set that the oPropSet variable identifies.

index

An integer that identifies the position where Siebel CRM must insert the property set. The childObject argument identifies this property set.

Usage

For more information, see How Siebel CRM Handles Indexing for Child Property Sets.

Used With

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

PropertyExists Method for a Property Set

The description of the PropertyExists method for a property set is the same as the description of the PropertyExists method for a business service. For more information, see PropertyExists Method for a Business Service.

Format

oPropSet.PropertyExists(propName)

The arguments you can use with this format are the same as the arguments described in Table 85.

Usage

The GetProperty method returns an empty string for every nonexistent property, so you can use the PropertyExists method in an If statement to determine if a specific property is set.

Used With

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

Examples

For an example, see GetFirstProperty Method for a Property Set.

RemoveChild Method for a Property Set

The RemoveChild method removes a child property set from a parent property set. This method does not return any information.

Format

oPropSet.RemoveChild index

Table 98 describes the arguments for the RemoveChild method.

Table 98. Arguments for the RemoveChild Method
Argument
Description

index

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

Usage

For more information, see How Siebel CRM Handles Indexing for Child Property Sets.

Used With

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

Examples

The following Siebel VB code fragment removes every child property set of a property set:

Dim i As Integer
for i = 0 to outputs.GetChildCount()
   outputs.RemoveChild(0)
Next i

Related Topics

For more information, see the following topics:

RemoveProperty Method for a Property Set

The RemoveProperty method removes a property from a property set. This method does not return any information.

Format

oPropSet.RemoveProperty propName

The arguments you can use with this format are the same as the arguments described in Table 86.

Used With

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

Reset Method for a Property Set

The Reset method removes all properties and children from a property set. This method does not return any information.

Format

oPropSet.Reset()

No arguments are available.

Usage

The Reset method allows you to reuse a property set.

Used With

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

SetByteValue Method for a Property Set

The SetByteValue method sets the value of a property set. This method does not return any information.

Format

oPropSet.setByteValue(value)

Table 99 describes the arguments for the SetByteValue method.

Table 99. Arguments for the SetByteValue Method
Argument
Description

value

The byte array that contains the value that Siebel CRM must set.

Used With

Siebel Java Data Bean

Examples

The following example uses a binary value as input and then provides a binary output. For more information, see GetByteValue Method for a Property Set:

SiebelPropertySet input = new SiebelPropertySet();
SiebelPropertySet output = new SiebelPropertySet();

input.setProperty("ProcessName", "LMS3 Jason");

// XML to send
String str="<?xml version=\"1.0\" encoding=\"UTF8\" ?><GetCommunicationDataInput><MemberID>20048963</MemberID></GetCommunicationDataInput>";

// convert string to byte array
byte [] bvalue = new String(str).getBytes();

input.setByteValue(bvalue);
businessService.invokeMethod("RunProcess",input,output);

// use getByteValue to return the value and put it in a String
String out2 = new String (output.getByteValue());
System.out.println(out2);

SetProperty Method for a Property Set

The SetProperty method sets a value in the property of a property set. This method does not return any information. For more information, see GetProperty Method for a Property Set.

Format

oPropSet.SetProperty propName, propValue

The arguments you can use with this format are the same as the arguments described in Table 87.

Used With

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

Examples

This Siebel VB fragment uses the Shipping Engine business service:

   Dim Svc As Service
   Dim Inputs As PropertySet, Outputs As PropertySet
   Set Svc = TheApplication.GetService("Shipping Engine")
   Set Inputs = TheApplication.NewPropertySet()

   With Inputs
      .SetProperty "Shipping Company", "Airline"
      .SetProperty "Weight", "12"
      .SetProperty "Total Dimensions", "48"
      .SetProperty "Shipping Method", "Second-Day Air"
   End With   

For more information, see Service_PreInvokeMethod Event.

SetType Method for a Property Set

The SetType method sets the value for the type attribute of a property set. This method does not return any information.

Format

oPropSet.SetType type

Table 100 describes the arguments for the SetType method.

Table 100. Arguments for the SetType Method
Argument
Description

type

A string that contains data that Siebel CRM must store in the type attribute.

Used With

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

Related Topics

For more information, see the following topics:

SetValue Method for a Property Set

The SetValue method sets the value for the value attribute of a property set. This method does not return any information.

Format

oPropSet.SetValue value

Table 101 describes the arguments for the SetValue method.

Table 101. Arguments for the Arguments for the SetValue Method
Argument
Description

value

A string that contains data that Siebel CRM must store in the value attribute.

Used With

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

Related Topics

For more information, see the following topics:

Siebel Object Interfaces Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.