Back Forward About Declare Expression rules
 

Decision category
  1. About 
  2. New 
  3. Expressions 
  4. Pages & Classes 
  5. Change Tracking 
  1. History 
  2. More... 

Purpose

Use Declare Expression rules to define automatic computations of property values based on expressions.

NoteDon't confuse Declare Expression rules with simple expressions. Expressions — a syntax that includes constants, function calls, operators, and property references — are used in many situations in addition to Declare Expression rules.

Forward chaining

Often, PRPC recomputes target property values automatically each time any of the other input values in the expression change, or when a value for this property is accessed, changed, or using other criteria. This technique is known as forward chaining.

For example, you can declare that a property named Order.TotalPrice is always the sum of:

and so on. You can also declare that OrderLine().TotalPrice is always equal to .Quantity multiplied by.UnitPrice.

Backward chaining

In an activity, the Property-Seek-Value method can access the computational relationships among properties in a Declare Expression rule to identify source values needed to compute a missing property value. This technique is known as backward chaining.

For example, consider a single Declare Expression rule defining Circumference as 3.1416 times Diameter with Change Tracking set to Whenever used. This rule can be used in either forward-chaining or backward-chaining mode:

Access

Use the Application Explorer to access the Declare Expression rules that apply to work types in your application. Use the Records Explorer to list all Declare Expression rules available to you.

Delegation

C-494 KHATV After you complete initial development and testing, you can delegate selected Declare Expression rules to line business managers. The Expressions tab of the form provides managers access to the fields most often updated.

TipFor each Declare Expression rule in your application, consider which business changes might require rule updates, and whether to delegate the rule to non-developers who then can make such updates directly. See How to build for change.

Category

Declare Expression rules are instances of the Rule-Declare-Expressions rule type. They are part of the Decision category.

NoteThis rule type name ends with S. The Rule-Declare-Expressions rule type replaces the 03-02 Rule-Declare-Expression class, which is deprecated.

Related topics About Expressions
About the Declarative Network display
Declarative processing — Concepts and terms
How to unit test a declare expression rule
Standard rules Atlas — Standard declare expression rules

Decision category C-460
Help System home pageHelp Home