The right section of the Expression Builder contains a text field (Expression editor) where you construct your expression. Type your expression in the editor manually, or use the Expression element panel in the left section to add elements.
Expression Elements
There are four elements used to build expression statements. Select elements and double-click items to select from the lists.
- Functions. Functions are grouped into categories such as Date/Time (Format), Metadata, Numeric, and so on. By default, all functions are displayed under the category All Functions.
- Attributes. All attributes for the current data source are available.
- Literals. Five literals are available (True, False, "String", "Integer" and "Decimal").
- Operators. The common operators such as > (greater than) and IF are available. The operators are also provided as buttons under the Expression editor.
- Free-form data value text. These are literal values (usually a value contained in an attribute) that you manually enter into an expression; for example, "New York", "Dennis Bermudez", and "tomato." This text is case-sensitive; when you add these values into an expression, they must match exactly how the values read in the attribute.
Searching and Inserting Elements
The Search bar in the upper left corner provides a quick way to search for the expression elements. When you select a search result, it will be inserted into the editor with appropriate spaces, quotation marks, and parentheses as necessary. You can also start entering a function, attribute, or operator name into the expression and the Expression Builder automatically displays suggestions to select from.
Search for expression elements
To search for expression elements
Insert elements by typing ahead
- Click inside the expression editor.
- Start entering the name of the element you want to insert. A list opens showing potential matches. For example, after the function IS_EMPTY( ), if you enter (LOAN), the list might display attributes named LOAN_NUMBER and LOAD_DATE as suggestions from which to choose.
- Choose a suggestion to add it to the current location of the cursor.
Toolbar
- Undo . Click to undo the last action.
- Redo. Click to repeat the last action.
- Go to Line. Click . Enter the line number and click OK to go to a specific line.
- Find and Replace. Click to do the following:
- Search for specific characters or words. Enter the text in the Find field. The first instance of the text is highlighted in the expression window. Click Find Next to find the next occurrence.
- Replace specific characters or words. Enter the replacement text in the Replace With field and click Replace or Replace All (to replace all instances). To replace a term with a blank, do not enter text in the Replace With field before clicking Replace or Replace All.
- Find or replace only text that matches uppercase and lowercase. Select the Match Case check box.
- Click Done to close the Find and Replace window. In the Expression Builder, click Undo if you want to revert the changes you made in the Find and Replace window.
- Font Size. Click or to increase or decrease the font size.
- Wrap Text. Click to wrap the expression according to the size of the editor.
- Expand and Collapse Editor. To change the size of the Expression Builder
window, do the following:
- Drag any corner or side of the Expression Builder window to resize it.
- Click to expand the window. Click again to return to the original size.
- Click to collapse the window down to a bar. Click to return to the original size.
Validation
You can validate your expression as you work using the Auto-validate check box, or you can manually validate it when the expression is complete using the Validate button. The result of rule validation is displayed in the validation message area at the bottom of the Expression Builder. See Creating and Editing Expressions for detailed information on using validation.
Shortcut Menu
You can quickly create and edit the expression by selecting commands from a shortcut menu. Right-click the text line in the Expression editor and select a command. The following commands are available: Undo, Cut, Copy, Paste, Delete, and Select all.
Keyboard Shortcuts
- Ctrl+A = Select all
- Ctrl+C = Copy selected text to the clipboard
- Ctrl+X = Cut selected text to the clipboard
- Ctrl+V = Paste copied text from the clipboard
- Ctrl+Y = Redo
- Ctrl+Z = Undo