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

Using Functions in the Predefault and Postdefault Properties


The Pre Default Value property of a field assigns a value to this field for a new record. If Siebel CRM displays this field, and if it is not set to Read Only, then the user can modify this field. For example, the Currency Code field contains the following predefault value:

System: Currency

Siebel CRM sets the currency code for a new contact to the default system currency.

If you set the predefault value for a date and time field, then you must not use quotes to enclose the value. For example, assume you use the following predefault value for a DTYPE_UTCDATETIME field:

"07/31/2007 23:59:59"

This configuration results in an error message that is similar to the following:

The value "'07/31/2007 23:59:59'" cannot be converted to a date time value.(SBL-DAT-00359)

The Post Default Value property of a field assigns a value to a field before Siebel CRM writes the record to the database. For example, the Personal Contact field contains a postdefault value of N. If the user does not designate a new contact as personal, then Siebel CRM assumes that it is not a personal contact.

If the Type property of a field contains any of the following values, then this field is a date and time field:

  • DTYPE_DATE
  • DTYPE_DATETIME
  • DTYPE_TIME
  • DTYPE_UTCDATETIME

Table 209 describes the format that Siebel CRM uses in a function that references a predefault or postdefault field.

Table 209. Format That Siebel CRM Uses in Functions That Reference Predefault or Postdefault Fields
Function
Result Type
Description

Expr: 'Timestamp()'

Date Time

or

UTC Date Time

Returns the date and time. This expression is equivalent to the Timestamp function that returns the current date and time. It returns the same value as System: Timestamp. For example:

Expr: 'Timestamp()' + 0.041667

This code returns the current date and time plus one hour.

For more information, see Using the Timestamp Function.

Expr: 'Today()'

Date

Returns the day. This expression is equivalent to the Today function. It returns the current date. It returns the same value as System: Today. For example:

Expr: 'Today() - 1'

This code returns the date for yesterday.

You can use the Today function only with a DTYPE_DATE field. If you use it with a DTYPE_DATETIME or DTYPE_UTCDATETIME field, then Siebel appends the following value to the current date:

12:00:00 AM

Field: 'FieldName'

String

Returns a value that the FieldName field of the current business component contains.

If FieldName is a joined field, then Field: 'FieldName' does not work in the Predefault Value property.

You must make sure the field that Siebel CRM defaults and the referenced field are the same field type. For example:

  • If the defaulted field is a DTYPE_DATE field, and if the referenced field is a DTYPE_DATETIME field or a DTYPE_UTCDATETIME field, then Siebel CRM does not include time in the defaulted field.
  • If the defaulted field is a DTYPE_DATETIME field or a DTYPE_UTCDATETIME field, and if the referenced field is a DTYPE_DATE field, then Siebel CRM appends the following string to the defaulted field:

    12:00:00 AM

Parent: 'BusComp.Field', 'BusComp.Field'

String

Returns the value that a field in the parent business component contains.

To default a value, the Link Specification property of the field in the parent business component must be set to TRUE.

You can include multiple BusComp.Field arguments where a comma separates each argument. Siebel CRM examines these arguments from first to last until it finds a value. For example:

Parent: 'ServiceRequest.Account', 'Account.Name'

You must include a space after each comma that separates a field. If the business component name includes an apostrophe, then you must enclose the name with double quotation marks. For example:

Parent: "FINS AG Agent's Contracts.Status Of Contract"

You can use a System call to terminate a chain of parent calls. For example:

Parent: 'Opportunity.Currency Code', 'Account.Currency Code', System: Currency

System: Creator

String

Returns the login name. For example, BSTEVENS.

System: CreatorId

String

Returns the login ID. For example, 0-3241.

System: Currency

String

Returns the currency for this position. For example, USD. The Currency field in the Divisions or Organizations view of the Group Administration screen sets this currency.

If the division uses a currency that is different than the currency that the organization uses, then Siebel CRM uses the division currency.

System: LocalCurrency

String

Returns the currency that the client computer uses. For example, JPY.

This function is not available for a client that runs in standard interactivity mode.

System: OrganizationId

String

Returns the organization ID. For example, 1-24E1.

System: OrganizationName

String

Returns the organization name. For example, Siebel Service.

System: Position

String

Returns the position name. For example, VP of Sales.

System: PositionId

String

Returns the position ID. For example, 0-4432.

System: Timestamp

Date Time or UTC Date Time

Returns the date and time for today. For example:

04/02/12 11:15:22

If you use the System: Timestamp function as the predefault value for a field, then the data type for this field must be DTYPE_DATETIME or DTYPE_UTCDATETIME.

System: Today

Date

Returns the date for today. For example:

04/26/12

If you use the System: Today function as the predefault value for a field, then the data type for this field must be DTYPE_DATE.

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