Design > Understanding Data Types and Field Properties > Using the Expression Editor
  

Using the Expression Editor

The Expression Editor allows you to edit field definitions when you define a process or service connector.
You can open the Expression Editor from Process Designer in two contexts:
Expression Editor allows you to:
Note: The Expression Editor in Application Integration comes with powerful functions that can invoke operating system features. You must review the contents passed into the functions before using them.

Opening the Expression Editor

Where available, click the f(x) icon to open the Expression Editor.
For example, in an Assignment step, you might add an input field with a Formula as the data source. You can select Formula from the list, as shown in the following image:
After the Expression Editor opens, you can use the features described below. The field type and name appears in the window title, as shown in the following image (input.TestInput):
When opened from a service connector, you can choose a type (XML, XQuery, JSON, or Content) and see the fields available in the Connection Properties and Input Parameters, as shown in this image:

Editing Options

When using the Expression Editor, you can use the toolbar and/or the following keyboard shortcuts, which are available when the editor is active (the cursor is blinking):
Undo
Ctrl+Z
Redo
Ctrl+Y
Copy
Ctrl+C
Cut
Ctrl+X
Paste
Ctrl+V
Find
Ctrl+F
Indent four spaces
Tab
Show list of available variables
$
Show list of available insertions (namespaces, functions, fields and common code fragments)
Ctrl+Space
(You can also start typing in the editor to filter the list and select the function or variable you need.)
You can also expand the editor window to full screen using the toolbar icon. Click Esc to close the full screen editor and return to the canvas.

Building a Formula

To enter a formula that determines the value for the selected field, you can access these options from the toolbar:
For example, in the following image, the Insert list shows the field names associated with the object:
Choose Functions to show a list of those available, sorted by category.
Use the XML Objects list to add an XML code snippet for the field when you are defining a process object. For example, you might create an XML snippet to represent a process object and then use Insert Field to add the input field as shown in this image:
To get more information about a function, hover over the function name in the list to display a description. For example:
Note the following tips when you work with the editor:

Syntax Validation

As you build a formula, the syntax is validated. If an error is detected, a red X appears next to the line that contains the error. Hover over the error indicator to display a description of the error:
As you type, the syntax is validated and the Expression Editor displays a message if it encounters an error condition.
XQuery error messages are defined by the XQuery engine. You can learn more about XQuery validation and see a list of XQuery error conditions (in Appendix F) here: http://www.w3.org/TR/xquery-3/.