| Print Open PDF Version of Online Help

### Using Expression Builder In Oracle CRM On Demand, you can use Expression Builder wherever you see the fx icon beside a text box. Clicking the icon opens Expression Builder in a separate window. NOTE: For information about field names and the field-name syntax in expressions, see About Expressions. To build an expression Click the fx icon to open Expression Builder. In Expression Builder, select the fields and functions from the lists, or type in the expression editor. When you select a field from the list, the language-independent name of the field is pasted in to the expression editor. For example, when you select the Close Date field from the list of Opportunity fields, [{Primary Revenue Close Date}] is pasted into the expression editor. NOTE: The field names that are shown in the Fields list in Expression Builder are the display names for the fields. If your administrator changes the display name for a field, then the Fields list shows the new display name for the field. However, when you select the field from the list, the language-independent name of the field is pasted into the expression editor. The brackets around the field name indicate that the value of the particular field will be evaluated and returned in its specific data type. See the following table for more information about selecting fields and field values. Edit the expression by adding operators and literals as needed. NOTE: If you want your expression to determine whether a picklist field has a certain value, do not type the value in the expression. For example, do not type [{Type}] = "Customer". Instead, select the picklist field from the list, and then click the Show Acceptable Values link in Expression Builder. Select the value that you want to use in the expression from the values shown. The expression looks something like the following: [{Type}]=LookupValue("ACCOUNT_TYPE", "Customer") (Optional) Add comments to your expression, as follows: To indicate the start of a comment, type a forward slash (/) followed by an asterisk (*). To indicate the end of a comment, type an asterisk followed by a forward slash. For example: /*This is my comment*/ You can add comments at the start or end of an expression, or at any location within the expression. You can add multiple comments to a single expression. Comments in an expression are ignored when the expression is evaluated. However, it is not possible to include a comment that will be ignored within the subject line or the message in an email on a workflow Send Email action. In these locations, the forward slash and the asterisk are interpreted as plain text and will appear in the subject line or email message, together with any other text that is placed within the asterisks. NOTE: You can also use the comment functionality to make an expression inactive. For example, if you want to make a field validation expression inactive, but you do not want to delete it, then enclose the expression within the forward slash and asterisk characters as described here. If you later want to make the expression active again, then delete the forward slash and asterisk characters from the beginning and end of the expression. (Optional) Click Check Syntax, and then make any corrections. Save your expression. The following table describes Expression Builder.
Interface Element | Description
--- | ---
record type Fields | Provides a context-specific picklist of the fields (from the context record type) that are allowed in an expression. If your company administrator has renamed some fields, the Fields picklist shows the new field names. Note the following points: If you are creating a workflow rule, or actions related to a workflow rule, the context record type is the record type specified in the definition of the workflow rule. For example, if you are creating the body of an email that is to be sent as an action on a workflow rule for a service request record, the context record type for Expression Builder is Service Request. In advanced field management, the context record type is the record type that is the parent of the field where the expression is being created. For example, when defining field validation on an opportunity field, the context record type for Expression Builder is Opportunity.
Show Acceptable Values | When you have selected a field from the Fields picklist, click Show Acceptable Values to display the acceptable values for that field. If the selected field is a picklist field, Show Acceptable Values displays all the options configured for that picklist. You can select only one option at a time. Selecting an option results in the definition of a Lookup function that can be used in an expression. If the selected field is not a picklist field, Show Acceptable Values displays a window that describes the acceptable values for a variety of data that the field can hold.
Functions | Provides a drop-down list of the special functions that are available to modify, extract, or process data within an expression. For a list of the available functions, see Expression Builder Functions.
Expression | A multiline editable text box that displays the expression. For information about the maximum supported length of an expression, see About Expressions. Fields and functions that you select from the picklists appear in the expression editor. You can also type expressions directly in the expression editor. The expression syntax always displays the language-independent field names. (A language-independent name is a name that does not change when the user language changes.)
Syntax Guide | Displays the Expression Builder topic in Oracle CRM On Demand online help.
Sample Expressions | Displays the following topic, Expression Builder Examples, in Oracle CRM On Demand online help.
Check Syntax | Validates the syntax of the expression that you created.
Save | Saves the expression.
Cancel | Closes the Expression Builder window without saving any changes.
#### Related Topics See the following topics for related Expression Builder information: About Expression Builder About Expressions Data Types in Expression Builder Expression Builder Operators Expression Builder Functions Expression Builder Examples

Published 5/23/2022 | Copyright © 2005, 2022, Oracle and/or its affiliates. Legal Notices.