Declaring a Local Variable

This topic describes how to declare a local variable. You can access the value of a local variable only in the script where you define the local variable.

To declare a local variable

  1. Open the Siebel Script Editor.

    For more information, see Opening the Siebel Script Editor.

  2. In the navigation tree of the script editing window, expand the object tree, and then click the script you must modify.

    For example, expand the WebApplet tree, and then click WebApplet_PreInvokeMethod.

  3. In the script editing window, use one of the following statements in your custom script:

    • In Siebel VB, use the Dim statement.

    • In Siebel eScript, use the Var statement.

Example of Declaring a Local Variable in Siebel VB

The following example declares a local variable in Siebel VB:

Sub WebApplet_Load
   Dim localStr As String
End Sub

Example of Declaring a Local Variable in Siebel eScript

The following example declares a local variable in Siebel eScript:

function WebApplet_Load ()
{
   var localStr;
}