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

Copy Method

This method returns a copy of a property set.




Not applicable



A copy of the property set indicated by oPropSet


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, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script, Web Client Automation Server


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()
   TheApplication.RaiseErrorText message

End Sub

Siebel Object Interfaces Reference