Using Less Code to Write an Else Statement
The conditional operator is a type of operator that
allows you to use less code when you write an Else statement. A statement
that includes a conditional operator is more difficult to read than
an If
statement. It is recommended that you use a
conditional operator only if the expressions in the If statements
are brief.
The following format illustrates how the question mark (?) represents the conditional operator:
variable = expressionA ? expressionC : expressionC
where:
expressionA is the expression that Siebel eScript evaluates first.
expressionB is the expression that Siebel eScript evaluates if expressionA is true. If expressionA is true, then Siebel eScript replaces the value of the entire expression with the value of expressionB.
expressionC is the expression that Siebel eScript evaluates if expressionA is true. If expressionA is false, then Siebel eScript replaces the value of the entire expression with the value of expressionC.
To use less code to write an Else statement
Use a conditional operator instead of an Else statement.