![]() |
This section provides information about types of Expressions. The different types of expressions are: |
![]() |
A regular expression is a script that computes the values for a target property as defined in the Expression data model. An Expression is executed when a record is inserted or updated in a class to which the expression is attached (when the Expression is set to Is Active mode). You can calculate the average, sum, division, concatenation, and so on of the values for the properties of a particular class. The block diagram depicts a typical representation of an expression and its relationship to the classes and properties in the Expression Management data model.
This table describes the variables defined in the expression:
The values in the variables B and C are added and the
result is assigned to the variable
|
![]() |
This section explains the order of the execution of the variables. The order of execution of variables is:
|
![]() |
Expression:
This is an example of a simple expression: Requirement: To evaluate the risk score for the items in the Item class based on the predefined risk factors of the items, as in this table.
This table describes the variables to be defined for the corresponding properties:
Computation:
The expression in this diagram computes the total risk score for the items in the Item class based on the risk factors of each item.
Result
|
![]() |
Expression:
|
![]() |
A Sub-Expression is a script used to calculate the value of a variable in a regular expression. For example, A = B + C is the regular expression. The value of B is derived from the sub-expression B = E + F, where, B, C, E, and F are variables you define. For more information on sub expressions, see Creating Expressions With Sub-Expressions. <create link here>
This is an example of a sub-expression: Requirement: To calculate the total cost of an assembly in United States dollars (US $) local currency, as in this table.
This table describes the variables to be defined for the corresponding properties:
Computation:
This diagram represents the computation of the Assembly Cost:
|
![]() |
Use the Class Copy Manager to edit a record in a class
based on the evaluation and the computed result of an expression defined
for another class.
Copy Expression Class The Copy Expression class is used to specify the source and target classes. A record is edited in the target class based on the result returned by the expression defined for the source class. This table describes the properties associated with the Copy Expression class:
|
![]() |
Use the classes under the Class Copy Manager folder to execute Copy expressions. For more information on Copy Expressions see, Creating Copy Expressions. <create link here> What is a Copy Expression A Copy expression enables you to insert, update, or delete a record from a target class based on the evaluation of an expression from the source class. You can also assign a particular value for the target property based on the evaluation of expression defined on another (source) class. Why Use Copy Expressions. You can use Copy expression to update the preferred supplier list based on the estimated preferred items list. Features of Copy Expressions Using a Copy expression you can:
Note: If the property and pointer labels are same in both the source and target classes, you need not map the properties and pointers from the source class to the target class. The Logical Data Definitions (LDDs) of the source class and target class should match. For example, if the source class property is text type, the target class property should also be text type.
This is an example of Copy Expression. Requirement: Insert, update, or delete items in the Preferred Item class based on the preference score of the items in the Items class. Available Data:
This table describes the variables to be defined for the corresponding properties:
When the five records of the Item class are edited, the expression attached to the class is executed and an insert, update, or delete operation is initiated on the Preferred Item class based on the criteria specified in the expression. |