Configuring calculated custom fields
You can add calculated custom fields that generate values based on other field input values. Calculated custom fields generate read-only numeric, text, date/time, list item, and time span output values.
Keep the following in mind before configuring calculated fields.
- Options for calculating values depend on the calculated field's output type. Numeric, text, date/time, and list item output can be generated using a formula. List item outputs can also be generated using the table lookup method. Time span outputs can be generated using selected field values.
- Calculated fields use formulas to generate values. ECMAScript is the standard scripting language used in formulas. You can use the built-in formula editor and toolbar to create simple formulas that generate output, such as a value calculated by multiplying numeric input values or a value that concatenates two input values to generate a new text string. See Adding calculated field formulas. If you are familiar with ECMAScript, you can configure more complex formulas for calculated fields. See Understanding calculated field formula syntax.
- Calculated field values are stored in the Helix ALM database. When new calculated fields are added, formulas must run for all existing items to update the project. These updates may impact performance, so consider making calculated fields active in the project during downtime. After adding calculated fields, you can specify when to recalculate values in items. See Recalculating field values.
- When calculated fields are added or field values are recalculated, emails are sent for automation rules and user notifications configured to send email about any item change. Emails about specific issues are also sent to users or customers included in the notifications list on the issues Email tab.
- If field values used in a formula calculation are not available in an item, the calculated field is left empty. This may occur if a formula relies on other fields created after items were added to the project. Editing existing items to provide the missing input values automatically updates the calculated field value.
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. Click Add in the Active Fields area to create a new calculated field. See Adding calculated custom fields.
Note: The 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.
4. Select a custom field and click Edit to change it. See Editing custom fields.
5. Select an active custom field and click Top, Move Up, Move Down, or Bottom to change the display order.
6. Select a field and click Delete to delete it. See Deleting custom fields.
You can only delete custom fields if all other users are logged out of the project and you do not have any items open for viewing or editing.
7. Click OK to save the changes.
Note: Depending on the changes, you may be prompted to recalculate fields in items. See Recalculating field values.