You are here: Reference > Rule types > Declare Expressions > Declare Expression form - Completing the Expressions tab

Declare Expressions form
Completing the Expressions tab

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

On this tab, record the computations for the target property identified in the key.

Using the controls

Click any condition or a comparison to enable controls.

Control

Action

open icon

Click to review a property (for a field that contains a property reference). If the property does not yet exist, click to create a new property.

expression selector

Click to display a drop-down list of all boolean expressions.

row buttons

Select a condition to enable. Then click the Add item icon to add a new condition, or click the Delete row icon to delete the selected entry (Equivalently, use the Insert, Shift+Insert, and Delete keys). To re-order conditions, you can use the Windows drag-and-drop operation.

If OR is selected as a boolean operator in an expression, click the Add item icon to add a new comparison, or click the Delete row icon to delete the selected comparison (Equivalently, use the Insert, Shift+Insert, and Delete keys). To re-order comparisons, you can use the Windows drag-and-drop operation.

Display Name

Display Label

When reviewing this tab, you can see a presentation using either property names or the Short Description (pyLabel) of properties. Click to toggle the display. (Note that two or more properties may have the same Short Description text.)

Modifying expressions with drag and drop operations

To move a condition or a comparison to a different location, click and drag the small circle located to the left of the entry.

To copy a condition or a comparison, drag the entry while holding down the CTRL key.

Completing fields

Field

Description

Whenever inputs change  
If

Click the drop-down button to select a boolean expression from the drop-down list. The form changes to reflect the expression selected.

Most expressions require parameters that may themselves be expressions. Use SmartPrompt to select a property as a parameter.

"Boolean Operator"

Depending on the expression selected, choose THEN, OR, or AND operator. If the OR operator is selected, you may add comparisons to the expression.

Set Property To

Select a computation type. The choices available depend on the type of the Target Property.

Keyword

Effect

Value of

Assigns the value of an expression to a property.

Sum of, Minimum of, Maximum of, Average of

Performs the computation indicated based on an aggregate property in the Expression field When you select any of these four aggregate operators, the Expression field must identify a single property reference (for example, a Value Group), not a more general form of an expression.

Value of first matching property in parent pages

This property is set to equal that of the first property with the same name found on a parent page. Only a property on a page of a class equal to or a descendant of this expression will be used as input. You can't use a When expression or rule with this computation type.

After this expression is defined, the link is immediately established and maintained by the system.

On the Change Tracking tab, the Calculate Value field must be set to Whenever inputs change' and the Execute this Expression field must be set to 'Regardless of any pages it is embedded in'.

This feature is known as property reflection, because the target property automatically updates to reflect the value of the parent property.

Count of

Performs the computation indicated based on a Page Group or Page List property in the Expression field.

True if Any Entries of

Applies an OR operation to a list or group of expressions, each of which returns true or false. Appears when the target property has type TrueFalse.

True if All Entries of

Applies an AND operation to a list or group of expressions, each of which returns true or false. Appears when the target property has type TrueFalse.

True if No Entries of

Applies a NOT operation to a list or group of expressions, each of which returns true or false. Appears when the target property has type TrueFalse.

Index for Minimum of

Finds the smallest value among the values in the aggregate property in the Expression field, and returns the index (subscript) of that value.

Index for Maximum of

Finds the largest value among the values in the aggregate property in the Expression field, and returns the index (subscript) of that value.

Result of Decision Tree

Evaluates a decision tree and assigns the result to the target property. See More... for information about special processing that can occur at runtime in this case.

Result of Decision Table

Evaluates a decision table and assigns the result to the target property. See More... for information about special processing that can occur at runtime in this case.

Result of Map Value

Evaluates a map value and assigns the result to the target property. See More... for information about special processing that can occur at runtime in this case.

(no label)

Enter an expression or identify a rule that computes a value for the Target Property. Based on the Set Property To field, complete this field:

Set Property To

     Instructions

Value of

Enter an expression, or choose and complete one of the function alias phrases from the selection list. Enter a pair of double-quotation marks ("") for a null text value.

If the Calculate Value field on the Change Tracking tab is set to Whenever inputs change, reference at least one input property on the primary page, the page that matches the class of the Applies To key part of this rule.

Your expression can reference properties on other pages — listed in the Pages & Classes tab — using a page name and property reference, but these properties are not change-tracked. References to aggregate properties apply to all elements of the property, so include parentheses () with no explicit subscript.

If the Page Context field is not blank, you can use the Parent keyword followed by a period and property name to identify properties on the immediate parent of the primary page, or the Top keyword followed by a period and property name to reference a property in the top-level page. (You can use the Parent keyword more than once.)

Sum of,
Minimum of, Maximum of, Average of, Count of,
Index for Minimum of, Index for Maximum of

Identify a single aggregate property containing the values to be summed, averaged, and so on. For Sum of and Average of, the property type must be numeric.

References to aggregate properties apply to all elements of the property, so include parentheses () with no explicit subscript. (You can't use the Top or Parent keywords here.)

Result of Decision Tree,

Result of Decision Table

Result of Map Value

Enter the second key part of a rule of that type. If the Page Context key part is empty, the system uses the Applies To key part of this rule as the Applies To key part of the referenced rule.

Otherwise, it uses the class of the Target Property as the Applies To key part. If the decision tree, decision table, or map value references named pages, identify these pages on the Pages & Classes tab. (You can't use the Top or Parent keywords here.)

using entries in which

Optional. This field appears only when you select Sum of, Minimum of, Maximum of, Average Of, True if Any, True if All, True if None, or Count of in the Set Property To field.

Enter an expression that evaluates to true only for those elements of the aggregate property that you want include in the computation. Leave blank to include all the elements.

Typically, the expression involves a comparison and a property within the aggregate property, for example:

.Color!="White"

where .Color is an embedded property within a Page List of class Embed-Houses. If the Page List property contains 100 pages and the Set Property To selection is Count of, this expression counts how many of the 100 pages have a Color value not equal to "White."

Otherwise Set Property

This expression determines the target property value when the conditions array is empty or all the condition rows evaluate to false. Complete both fields.

(no label)

Select an expression type such as Value of. This field is similar to the Set Property To field described above.

Expression

Enter an expression that computes a value for the Target Property. You can type the expression directly, or use the Expression Builder. For guided help with composing expressions, click the Open expression buildericon.

In the expression, the page that matches the class of the Applies To key part of this rule. Your expression can reference properties on other pages using a page name and property reference, but these properties are not change-tracked.

About Declare Expression rules