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

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 actual answer given to the question, as a string.

Returns

An evaluation of an answer, 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 against 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 actual stored answer. The value returned in the parameter will not be stored as the answer to the question, but will be used to choose the answer used for branching.

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

Siebel SmartScript Administration Guide