Structure of expressions

You can enter expressions in Text, Integer, Float, and Date attributes and in Matrix and Time Grid attribute cells.

IBM® Rational® 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. You enter a reference to a text string by enclosing the text with quotes ("), for example, "Text string". You enter a reference to a number by entering the number, for example, 5.5 (note that numbers must be entered with dots). You enter a reference to an attribute value in one of the following ways:

Table 1. References in attributes
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 you have single quotes (') or exclamation marks (!) in your attribute names, 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.

Matrix attribute cells

When you refer to the cells in a matrix attribute, specify which cells you request.
Table 2. References in Matrix attribute cells
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.
Note: This expression cannot be used in a Time Grid attribute cell.
An expression usage:
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.
Table 3. References in Time Grid attribute cells
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.

Feedback