Alternative Ways to Create Calculated Fields
This topic describes alternative ways to create a calculated field.
Exposing Calculated Siebel CRM Fields
To create a calculated field, you can expose a calculated field that exists in Siebel CRM to an integration object and then synchronize it to Siebel CRM Desktop. However, if this field is not read-only in the client, then Siebel CRM Desktop attempts to synchronize the new value back to Siebel CRM, and this synchronization fails.
Specifying Fields in the Siebel Meta Info File as Calculated Fields
You can specify a field in the siebel_meta_info.xml file as a calculated field. To do this, you set the IsCalculated attribute to yes and then use the following code to specify a value for the Formula attribute:
:[ :] Block, should contain field.
:( ) Container for fieldname.
For example, you can use the following code to combine the First Name field and the Last Name fields:
:[:(First Name) :(Last Name):]
This primary allows you to concatenate fields with the possibility to add some static characters to the concatenation. It does not allow you to configure Siebel CRM Desktop to do a calculation. You specify this code in the siebel_meta_info.xml file. Siebel CRM Desktop only determines the calculated value during synchronization. From this point the field is read-only.
Using JavaScript to Mimic Calculated Fields
You can write JavaScript that mimics the behavior of a calculated field. You can configure Siebel CRM Desktop to run this JavaScript code only in reply to something that happens in the form, such as the user changing the value in a field. This configuration updates a field if the data changes in the form but you cannot use it to control the value of a calculated field that Siebel CRM Desktop displays when the user opens a form.