Use Expressions, Statements, and Statement Blocks

An expression includes two or more terms that perform a mathematical or logical operation. These terms are typically variables or functions that you can use with an operator to produce a string or numeric result. You can write code that uses an expression to configure Siebel eScript to do the following work:

  • Perform a calculation.

  • Manipulate a variable.

  • Concatenate a string.

The following example statement includes an expression. It computes a sum and saves it in a variable:

var TestSum = 4 + 3

Note the following:

  • Siebel CRM runs Siebel eScript code one statement at a time from the beginning of the code to end of the code.

  • You can use a semicolon at the end of a statement, although Siebel eScript does not require this format.

  • To make your script easier to read and edit, it is recommended that you write each statement on a separate line, with or without a semicolon.

  • A statement block is a group of statements that Siebel eScript treats as one statement. You use curly brackets ({}) to enclose a statement block. To simplify reading, it is recommended that you indent the statements in a statement block.