Siebel Developer's Reference > Operators, Expressions, and Conditions > Functions in Calculation Expressions >

Example of String Concatenation and the IIf Function


In the following example of assigning expressions to the Calculated Value property, the string constant "," must be enclosed in two double quotation marks because the entire value is quoted with double quotation marks. If the [Last Name] field is NULL and [First Name] is "Bob", the [Full Name] field contains ", Bob."

[Field]
Name = "Full Name"
TextLen = 102       // Last Name + First Name + 2
Calculated = "TRUE"
CalculatedValue = "[Last Name] + "," + [First Name]"

Alternatively, the next expression contains just "Bob" if the [Last Name] field is NULL and the [First Name] field is "Bob". (The CalculatedValue expression must be all on one line.)

CalculatedValue = "[Last Name] + IIf ([Last Name] IS NULL,
"", ",") + [First Name]"

Siebel Developer's Reference