Examples: NotesProperty class (LotusScript®)

This is the script for a form action. The action properties dialog has been used to associate this action with a "WSDL action" defined in a Wiring Properties design element, so that the form action executes when that form is open and the Property Broker triggers the WSDL action. It updates the value of propvalue on the form with the property value passed by the Property Broker.

Sub Click(Source As Button)
Dim s As New NotesSession
Dim workspace As New NotesUIWorkspace
If workspace.IsEmbeddedInsideWCT Then

  Dim pb As NotesPropertyBroker
  Set pb = s.GetPropertyBroker()
  Dim pbInputProperty As NotesProperty
  Dim pbContext As Variant

  'retrieves array of input NotesProperties
  'only first member of array is populated in this release
  pbContext = pb.InputPropertyContext 
  Set pbInputProperty = pbContext(0)

  Dim InputPropertyName As String
  Dim NameSpace As String
  InputPropertyName = pbInputProperty.Name
  cName$ = InputPropertyName(0)

  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.CurrentDocument
  Call uidoc.FieldSetText("propvalue",cName$)
  Call uidoc.Save
Else
  Messagebox "Wrong Configuration", MB_OK, "Basic Configuration"
End If
End Sub