Develop > Expression Language > Expression Language editor

Expression Language editor

Service Management provides a context-assisted editor to help you build expressions using Expression Language.

When you are entering an Expression Language phrase, start by pressing CTRL and the space bar to display a drop-down list. The list includes both objects and functions. When you hover over the functions, a tooltip displays the function syntax with its arguments. Select an item in the list and press Enter or double-click it to select it.

  • If you select a function, the function appears in the text box. You must complete the expression manually, by adding parentheses and the function arguments.

  • If you select an object, the object appears in the text box. Enter a period manually. A second drop-down list is displayed, including the available fields and relationships for the selected object. If you select a relationship and enter a period, another drop-down list is displayed with the available fields.

    For example, if you select entity as the object, typing a period displays a list of the available fields for the current record. If you select AffectsActualService, it denotes the Actual Service affected by the current record. Typing a period displays a list of available fields for that Actual Service. If you select OwnedByPerson, it denotes the person who is the owner of the Actual Service affected by the current record. When you click OK, the editor completes the expression as follows: ${entity.AffectsActualService.OwnedByPerson}.

  • You can press CTRL and the space bar at any point in the expression to display the drop-down list of objects and functions. If you display the list after an operator, it also includes the values true, false, and null.

Tip When a drop-down list is open, you can type the first few letters of the required option to filter the list.

When you click outside of the text box, the editor performs a validation on the expression. If the expression is not valid, an error message is displayed, detailing the source of the problem. Examples include an expression containing a field or object that does not exist, or an expression containing the wrong number of parameters for a function.

Color coding

The editor colors different parts of the expression to make it easier to interpret:

  • objects are colored purple
  • fields are colored blue
  • strings are colored red

Note  

  • You do not need to enter the $ symbol or the brackets manually. When you click OK, the editor automatically inserts these symbols into the expression.
  • The Expression Language editor does not display available parameters for dynamic complex fields such as the UserOptions field.

Related Topics Link IconRelated Information