...
If no target column is defined, the value of the expression (the input field Expression) will become the value of an eval tag. If is defined, it must contain the reference to a column of an object of Structured variable type in form: ObjectName[0]^ColumnName. This notation defines a structured variable column, which will contain the results of the expression evaluated.
Example:
If a constant expression of value 1 is defined, the process D2000 Calc (admistrator of objects of Eval tag) type ) ensures that all fields of a defined column will have the same value of 1.
If there is an expression Sec+1, the process D2000 Calc (admistrator of objects of Eval tag) type ) ensures that all fields of a defined column will have the same value, which corresponds to the value of system variable Sec increased by 1.
A reasonable use of this option is the possibility to use a reference to a column of a structured variable in an expression, where in brackets (row index) is a value of 0. Such reference will be reffered to as a reference to a column of a structured variable. This ensures that when evaluating an expression, the value of which is inserted into e.g. 3rd row, all the indeces with the constant value of 0 will be replaced with the value of 3.
Example:
Structured variable SV.Production consists of 10 rows and 3 columns.
Column | Type | Meaning |
---|---|---|
ProductsALL | Int | Number of products |
Rejects | Int | Number of rejects |
ProductsOK | Int | Number of good-quality products |
Obviously the following equation can be formed:
ProductsOK = ProductsALL - Rejects
Provided that the columns ProductsALL and Rejects are populated fully automatically and the value of the column ProductsOK is to be determined, it can be done with the configuration of an eval tag as described below:
Expression:
SV.Production[0]^ProductsALL - SV.Production[0]^Rejects
Calculation of the difference will be in the column SV.Production[0]^ProductsOK.
Note: The expression may contain references to columns of other structured variables.
Kotvasposob_vypoctu sposob_vypoctu
Evaluation method
sposob_vypoctu | |
sposob_vypoctu |
...