Examples of Using the Conditional Operator

In the following example, the expression is true and Siebel eScript sets the value of variableA to 100:

variableA = ( 5 < 6 ) ? 100 : 200;

Consider the following example:

TheApplication().RaiseErrorText("Name is " + ((null==name) ? "unknown" : name));

If the name variable contains:

  • A null value, then Siebel CRM displays the following text:

Name is unknown
  • A value that is not null, such as Pat, then Siebel CRM displays the following text:

Name is Pat