Siebel SmartScript Administration Guide > Extending Scripts with Siebel VB and Siebel eScript > SmartScript Question Events >

Question_PreBranch


Question_PreBranch lets a question be replaced, for purposes of choosing a branch, by the results of this function.

Syntax

Question_PreBranch(answer)

Argument
Description

answer

The answer given to the question as a string.

Returns

An evaluation of an answer, which is represented by an integer.

Usage

Question_PreBranch replaces the answer to a question by the results of this method. It is declared as an integer. The normal branching logic of matching answers to branches is performed, unless that event is overridden by this function. The final value of the Answer argument is compared with the answers given to determine which branch is to be taken out of this question. This allows programmatic processing to determine branching (among preconfigured branches), regardless of the answer that is stored. The value returned in the parameter is not stored as the answer to the question, but is used to choose the answer used for branching.

For example, if the caller supplies a bank account number, the function evaluates the number to determine what type of account it is and branches to questions for that type of account. The answer stored in the database, however, is the account number given.

Siebel SmartScript Administration Guide Copyright © 2006, Oracle. All rights reserved.