Siebel Developer's Reference > Operators, Expressions, and Conditions >

Calculated Field Values and Field Validation


The Calculated Value property specifies an expression for calculating the value of a field. A field's Validation property allows you to restrict the values for a single value field (validation is not supported for MVFs). The validation property is evaluated when the field is accessed and modified in the GUI only. The validation properties from the current applet's business component fields are evaluated. If these fields are part of other business components as well, those validation properties are not evaluated.

NOTE:  The Calculated Value and field Validation properties are limited to 255 characters.

The syntax for the Calculated Value or Validation property is the same as the QBE syntax, with different but overlapping functions. The comparison, logical AND, and logical OR operators are valid for these properties. The syntax follows.

The Calculated Value or Validation expression must be all on one line.

Calculated Value or Validation Statement

:   condition
:   expression

Condition

:   comparison
:   condition [AND | OR] condition

Comparison

:   [~] [= | < | > | <= | >= | [NOT] [~] LIKE] expression

Expression

:   constant
:   identifier
:   function

Constant

:   number
:   string (double quoted)
:   integer
:   currency
:   date (double quoted)   "MM/DD/YY"
         (separator must be "/")
:   time (double quoted)   "HH:MM:SS"
         (separator must be ":")
:   date and time (double quoted)
    "MM/DD/YY HH:MM:SS"   (space required)
:   Boolean
:   phone number (double quoted)

identifier

:   [field name]

For date and time formats in controls or list columns, use the format specified in the Control Panel. In Search Specification or predefined query form, use "MM/DD/YY" for date and "HH:MM:SS" for time.

To reference a field value, you must use [Field Name]. Also, string constants must be enclosed in double quotation marks ("string").

You can use the tilde (~) modifier to make case-insensitive string comparisons in Calculated Value expressions.

NOTE:  A field's Validation property cannot be used to make the field required based on another field value.

When a Calculated Value statement references more than one field value, and the fields have different data types, the order of the data types can have an effect on the calculation.

For example, the Quote Item business component has the calculated field Line Total, whose calculated value is [Item Price] * [Quantity]. The data type of Item Price is DTYPE_INTEGER; the data types of both Quantity and Line Total is DTYPE_CURRENCY.

If Item Price is 2.25 and Quantity is 5, Line Total is calculated to be 11.25. However, if the calculated value of Line Total is changed to [Quantity] * [Item Price], and you use the same values, Line Total is calculated to be 11.00.

Siebel Developer's Reference Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.