Creating Declare Expression rules
Create Declare Expression rules to automatically calculate values in your application. Declare Expression rules take advantage of values that exist in your system to calculate values of target properties. As a result, you increase automation of calculations in your application.
For example, in an online shopping order, an application can automatically calculate the tax value based on prices of the items and the information that tax equals a specific percentage of the item price. By implementing Declare Expression rules, the application recalculates the tax value every time the customer updates the shopping order.- In the header of Dev Studio, click .
- In the Target Property field, enter a property that you want to calculate, preceding the property name with a period.
- Optional: To restrict search for the result of the declare expression to a specific page, in the
Page Context field, enter a data page that stores available
results.For more information, see Data pages overview.
- In the Context section, select the application layer in which you want to store the rule.
- In the Apply to field, enter the class that stores the target
property.
- In the Add to ruleset field, enter a ruleset to store the rule.
- Click Create and open.
Previous topic Declare Expression rules Next topic Defining expressions in Declare Expression rules