Adding calculated custom fields

You can add calculated fields that automatically generate read-only numeric, text, date/time, list item, and time span field values based on other field values.

1. Choose Tools > Administration > Custom Fields.

The Setup Custom Fields dialog box opens.

2. Select an Item type. The fields displayed depend on the selected type.

3. To add a field, click Add in the Active Fields area. The Helix ALM database must be locked to add active custom fields. See Locking and unlocking projects.

To add a field without affecting existing items, click Add in the Draft Fields area. See Creating draft custom fields.

The Add Custom Fields dialog box opens.

4. Enter a Field name.

5. Enter the Long label.

Long labels are displayed in drop-down lists and help users distinguish between the same fields in different events.

6. Enter the Field code.

The field code is replaced with data and is used in email templates and reports.

7. Select Calculated as the Field type.

8. Select an Output type and select any Field Properties. The available properties depend on the selected output type.

Output types specify the type of value calculated fields generate. Field values calculated using a formula must return a value of the selected output type. If the calculated value does not match the output type, an error is displayed.

  • Numeric outputs are numeric values generated based on other field values. Enter the number of decimal places to round to. See Calculated numeric field example.

Note:  Calculated numeric output values can only include 15 digits or less.

  • Text outputs are string values, truncated to the specified character length, generated based on other text field values. The maximum output length is 255 characters. See Calculated text field example.
  • Date/time outputs are date/time values generated based on date/time values or after a time value is added to an input value. Select Include time to include a time in the output value. See Calculated date/time field example.
  • List item outputs are list item values generated based on mappings configured for numeric values or combinations of list item input values. Select a Calculated using option to calculate the output using a formula or the table lookup method. Select a Value list or click Setup List Items to create a new one. See Calculated list item field example.

Note:  Formulas for list item outputs use other field values to calculate a numeric value. The calculation result is mapped to a list item value, which is the generated output for the calculated field. See Adding calculated field formulas. The table lookup method provides a matrix of possible input combinations and allows you to assign output values to each combination. See Mapping calculated list item output values.

  • Time span outputs are the numeric difference between two specified date/time field values. Select the number of decimal places to round to, the fields to calculate the difference between, and a unit of time. See Calculated time span field time example.

Note:  If you select <Current time> as a time span calculation value, the field's calculated output is based on the last time the items were refreshed. To manually refresh time span values, choose View > Refresh. Time span fields that use the current time cannot be used as input for other calculated fields.

9. Click Edit to add a formula that calculates the output. You can only use formulas to calculate numeric, text, date/time, and list item outputs. See Adding calculated field formulas.

10. Click OK.

The field is added.

Tip:  After you add a calculated field, you may want to add the corresponding column to the list window to view generated output. See Changing list window columns and fonts.