Administering : Managing business rules and expressions : Structure of expressions
  
Structure of expressions
You can enter expressions in Text, Integer, Float, and Date attributes and in Matrix and Time Grid attribute cells.
Focal Point evaluates an expression and displays the value in the attribute or cell. All users can enter expressions, but non-administrators cannot use expressions to gain information that they do not have access to.
An expression always begins with an equal sign (=). One or more operands follow the equal sign. All operands are separated by calculation operators. The expression is calculated from left to right, according to a specific order for each operator in the expression. You can change the order of operations by using parentheses.
Each operand can be a text string, a number, or an attribute value.
Enter a reference to a text string by enclosing the text with quotes ("), for example, "Text string".
Enter a reference to a number by entering the number, for example, 5.5 (note that numbers must be entered with dots).
Enter a reference to an attribute value in one of the following ways:
Reference
Example
Explanation
'Attribute'
'Title'
Reference to the value in the attribute in the same element
'Element Title!Attribute'
'Req 14!Title'
Reference to the value in the attribute of a specific element in the same module
'Module!Element Title!Attribute'
'Requirements!Req 14!Title'
Reference to the value in the attribute of a specific element in a specific module
Notes
If your attribute names include single quotes (') or exclamation marks (!), you must exclude those marks when you enter expressions.
When you refer to a module, use the name of the module as it is displayed in the Modules menu. When you refer to an element, refer to the value of the element Title attribute. When you refer to an attribute, use the name of the attribute as it is displayed in the attribute list.
The value of an expression is negative if any of the attribute that is used in the expression has a negative value. Use the braces on the attribute values appropriately for the expression to evaluate correctly. For example, A = (B) / (C).
Matrix attribute cells
When you refer to the cells in a matrix attribute, specify which cells you request. Make sure to remove redundant parenthesis, to use extra parenthesis when you use negative numbers, and to test the expressions before saving.
 
Reference
Example
Explanation
'Attribute(cell)'
'MatrixValues(A2)'
Reference to one cell in a Matrix attribute. A2 is in the first column and in the second row.
'Attribute(cell:cell )'
'MatrixValues(A2:B4)'
Reference to more than one cell in a Matrix attribute. A2:B4 refers to the cells A2, A3, A4, B2, B3 and B4.
This expression cannot be used in a Time Grid attribute cell.
An expression usage:
=Sum('Matrix(A1:B2)') to get the sum of table cells A1+A2+B1+B2.
=Text('Matrix(A1:B2)') to get the combined text of table cells A1+A2+B1+B2.
Note You can enter expressions in the header column and row of a matrix attribute, but you cannot refer to the header column and row cells from other expressions.
Time Grid attribute cells
When you refer to a Time Grid attribute, specify which sheet and cell you request.
 
Reference
Example
Explanation
'Attribute(sheet;cell)'
'TimeGrid(Sh1;A2)'
Reference to a single cell in a sheet of a Time Grid attribute. Sh1 is the first sheet, and A2 is the cell in the first column and in the second row.
An aggregated time grid cell value cannot be referenced from another attribute.
Go up to
Managing business rules and expressions