Building expressions with the Expression Builder
Create calculations that save you time by automatically providing values in your application by authoring expressions in the Expression Builder. The Expression Builder eases the construction of expressions in your application by providing a large input area, prompting for functions, prompting for properties, and adding the ability to test your results.
For more information about the Expression Builder, see Expression Builder.
An expression is a single text element that, after evaluation at run time, usually returns a single value. Use expressions to perform operations on data, such as performing mathematical operations, comparing date and time values, manipulating text, transforming data, and converting data types. For example, you can create an expression to calculate the total salary of an employee using their base salary, a bonus that depends on their years of experience, and another bonus dependent on the number of certifications that the employee has.
- In Dev Studio, navigate to a place in your application where
you want to build an expression.The following figure shows the location of the Build an expression icon in a rule form:
- In the Expression builder dialog box, build an expression:
Choices Actions Enter the expression manually In the text field, enter an expression. You can include combinations of constants, functions, arithmetic operators, logical operators, comparison operators, and property references or property references. For more information, see Examples of expressions.
Browse for and apply a function - In the header of the Expression builder dialog box, click Browse.
- In the navigation pane, click Functions to expand a list of available function libraries.
- Click a function library to expand the available functions.
- Click the plus icon to add the function to your expression.When you add the function to the text area, the function does not include arguments.
- If the function requires an argument, enter the argument value.
Browse for and apply a property - In the header of the Expression builder dialog box, click Browse.
- In the navigation pane, click Properties to expand a
list of available properties organized by context.You can select properties from the following types of pages:
- Current Page
- Includes a list of properties from your current case context.
- Custom Pages
- Includes properties from custom pages defined on the Pages & Classes tab of the rule that you edit.
- Data Pages
- Includes a list of properties available from application data pages.
- Parameter Page
- Includes properties defined as parameters on the rule that you edit.
- Click the selected context to expand the available properties.Some areas, such as data pages or custom pages, might include nested data pages.
- Drag the property to the text field to add the property to your
expression.
- Optional: To validate the correctness of the expression, test the expression:
- In the header of the Expression builder dialog box, click Test.
- If your expression includes properties or parameters, in the Test data pane, enter the values that you want to use for testing.
- Click Submit.
Previous topic Expression Builder Next topic Expressions