Siebel Object Interfaces Reference > Interfaces Reference > Property Set Methods >

Copy


This method returns a copy of a property set.

Syntax

oPropSet.Copy()

Parameter
Description
Not applicable
 

Returns

A copy of the property set indicated by oPropSet

Usage

This method creates a copy of a property set, including any properties and children it may have. Because property sets are generally passed by reference, making a copy allows the method to manipulate the property set without affecting the original definition.

Used With

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

Example

This Siebel VB example uses a copy of a property set to store the original values of its properties, and displays both 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

End Sub


 Siebel Object Interfaces Reference 
 Published: 18 June 2003