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.
- 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.
- 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.
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.
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.