Siebel Tools >  How to add validation to a field

This was done using Siebel Web Client, Siebel Tools, Siebel Local Database 8.1.1.3
In Accounts List
Account Name = Honeywell Aerospace
Account Team = CCHENG

Drill down on the Account

Screen: Accounts Screen
View: Account Detail View
Business Object: Account
Applets: Applet[0]: SIS Account Entry Applet; Applet[1]: Account Profile Applet;
Business Components: BusComp[0]: Account; BusComp[1]: Account;

In Account Profile Applet, field Annual Revenue

Currently this field has default value null. Will set it to 0.00


Siebel Tools -> Object Explorer -> Business Component , search for Account.
Go to Field tab under Business Component. Search for Annual Revenue

In the Single Value Field tab under Business Component. Search for Annual Revenue

This basically confirms that we need to change properties only here.
Select Business Component Account and lock the project in Tools (ALT + L)

Enter these values in Single Value Field tab
Predefault value: 500
Validation Message String Override: Please enter 500 or more
Validation: >=500
Message Display Mode: User Msg

Compile this project. The web client should restart if you selected Auto start web client option.

Now go back to the screen. Enter an Annual Revenue of less than 500.
Try to save the value (press Control + S)
You should get an error message.

Enter a value that is greater than 500. This value should be saved.
The pre-default value means that if you create a new account, the Account Revenue field will have a value of 500.
All the fields and their possible values in a Single Value field are given below.

Property

Description or Usage

Valid Values/Examples

Calculated (O)

A TRUE or FALSE value.

TRUE—Causes the field's value to be calculated by the business component.

Calculated Value (O)

An expression to calculate the field's value.

 

Column (R)

The name of the database table's column. The column's name is case-sensitive and must be specified the same as it is in the database. Every reference to the field is made through its name.

 

This property is not allowed for calculated fields but is required for other fields.

Currency Code Field (O)

The name of the currency code field.

Default is Currency Code.

Used with a data type of DTYPE_CURRENCY.

Exchange Date Field (O)

The name of the exchange date field.

Default is Exchange Date.

Used with a data type of DTYPE_CURRENCY.

Force Active (O)

A TRUE or FALSE value.

TRUE—Causes the data value to be always retrieved from the database.

For best performance, do not use Force Active except where necessary.

NOTE: This property does not affect whether a field value is available through browser script.

Force Case (O)

The case for the field value.

Valid values are UPPER, LOWER, and FIRSTUPPER.

Hidden (O)

A TRUE or FALSE value that governs whether the field is displayed.

TRUE—Makes the field invisible to all dynamically created list views.

For a business component data type of DTYPE_ID, the default is TRUE; otherwise, the default is FALSE.

Join (O)

The name of the join object definition used by this field.

 

Used when the value of the field is retrieved from the table defined by the join.

Link Specification (O)

A TRUE or FALSE value

TRUE—Passes the field's value as a default value to a child business component's field.

A link specification is necessary if any business component used as the child of a link from this business component uses the Parent type of default values and expects to get a value

For best performance, only use if you need to predefault the parent value to the child value through the link, because this setting results in the column always being retrieved any time this object is active. Similar to ForceActive.

NOTE: This property does not affect whether a field value is available through browser script.

Message Display Mode

Specifies how detailed the validation message is.

User Msg—Displays only the message defined by the developer in Siebel Tools.

User Msg with Error Code Only—Displays the message and the error code returned from the object manager.

User Msg with Error Code/Msg—Displays the message the developer defined, the error code returned from the object manager, as well as the error message returned from the object manager.

Name (R)

The user-defined name for the field.

The name can contain spaces.

The name must be unique within the business component. All references to the field are made through its name.

No Copy (O)

A TRUE or FALSE value.

TRUE—During a Based On Last operation, causes the field's value not to be copied into the newly created record.

Oracle Sequence Object (O)

The name of an Oracle sequence object. The sequence is used for field defaults when creating a new record.

 

PickList (O)

The name of a picklist object definition used to display a list of valid values from which the user can choose.

 

Post Default Value (O)

Used to fill in a default value for a field if the user leaves the field blank and saves the record. Just before the row is committed, if the field is blank, the Post Default Value is used for the field. If the field has a user-entered value, the Post Default Value is not used.

Limited to 255 characters.

This property is not validated for a calculated field.

Pre Default Value (O)

The value used for an empty field when a new record is created through an Add New Record or Copy Record operation. The value might be changed by the user before the record is written to the database.

Limited to 255 characters.

This property is not validated for a calculated field.

Precision (O)

The maximum number of digits, to the left and right of the decimal point, for a numeric field.

Default is 16.

The maximum value available is database dependent.

Read Only (O)

A TRUE or FALSE value.

TRUE—Prevents the field value from being changed by the user.

Certain fields are read-only even if the Read Only property is FALSE. The Effective Start Date field for the following business components is always read-only:

Note that it is also possible to make a field read-only at the applet level.

Account Product

 

Promotion

 

Promotion Account

 

Promotion Account Product

 

Promotion Administration

 

Promotion Product

 

In general, fields that are based on a joined table are always read-only. There are two exceptions to this rule: joins to extension tables and joins to active intersection tables.

 

 

 

Required (O)

A TRUE or FALSE value.

TRUE—Requires a value to be entered into the field before the record can be written to the database.

There is a user property available to control Required based on an expression. For more information, see Siebel Developer's Reference.

Scale (O)

The maximum number of digits to the right of the decimal point for a numeric field.

Values are 6 for numeric values and 0 for integers.

The maximum value available is database dependent.

Text Length (O)

The maximum length of the text in the field.

 

This property is usually ignored, and the length is retrieved from the underlying column definition.

Type (R)

The field's data type. Be sure that the type you select corresponds to the data type in the physical layer.

 

Validation (O)

The expression used to ensure data correctness when data is entered.

The property text is limited to 255 characters.

Must be used only with single value fields, not MVFs.