19 About Expressions

An expression is a string enclosed in curly braces ({ }) that can be evaluated to a single value at runtime. Expressions can reference definition and instance properties and their values.

For example, you might have a list of values for an employee JobId field that displays all job titles from the jobId field from the Jobs business object. To list only the job titles for a given department based on the DepartmentId of the current row, you could use a query parameter with the following expression:

DepartmentId={ this.BusinessObject.Fields['DepartmentId'].Value }

The value of an operand or an intermediate result in an expression can be a string or integer. However, the result of a single expression is converted to a string when resolving the entire property value.

For any given configuration property that supports expressions, you must escape any curly braces you wish to use literally.

String literals inside expressions must be enclosed in single quotes ('). Single quotes inside string literals must be escaped ( \').

Note:

A given configuration property only supports a few specific types of expressions. Some configuration properties do not support expression language at all.

See Configure a Filter for a List of Values and Configure the Bind Parameters for a Descriptive Flexfield's List of Values for information about support for expressions for these specific configuration properties.

Operators

Operator precedence is high to low.

Operator Note
[ ] . Collection access, object member access
( ) Grouping to change precedence
- ! Unary minus, negation
* / Math (multiplicative)
+ - Math (additive), also + for string concatenation
< > <= >= Relational
== != Equality
&& Logical AND
|| Logical OR
? : Ternary conditional

Reserved Words

Reserved Word Note
this

Represents the property owner depending on the configuration context. For example, when defining a field's configuration property, "this" represents the field.

See specific configuration properties for details.

Value Value of a parameter or a field
SelectWindow search-and-select window in a list of values

Examples

Here are some sample 'q'-type filter query parameters for use in list of values configurations:

Parameter Value Use Sample Value Final Parameter Value
DepartmentId={ this.BusinessObject.Fields['DepartmentId'].Value } This string sets the value of DepartmentId in the query to the current row item's department Id value. Department id is 101 DepartmentId=101
FirstName LIKE '{ SelectWindow.SearchTerm }*' This string matches employees whose first name begins with the user-provided search term entered in the Search-and-Select window. Search term is Steve FirstName LIKE 'Steve*'
DepartmentId={ this.BusinessObject.Fields['DepartmentId'].Value } { SelectWindow.SearchTerm == '' ? '' : 'AND FirstName LIKE \'' + SelectWindow.SearchTerm + '*\'' }

This string includes two expressions. The second expression uses the ternary operator. It returns results based on whether there is a search term in the search box.

If there is no search term, the parameter returns values matching the current row item's department Id value.

If there is a search term, the parameter returns results that match the department Id and the search term.

The quotes are all single quotation marks. Note also the enclosed empty strings and escaped single quotes.

Department id is 101 and there is no search term DepartmentId=101
Department id is 101 and the search term is Steve DepartmentId=101 AND FirstName LIKE 'Steve*'