June 4, 2012

Calculated Fields Conundrum - List Item or Text for Output Type

Helix ALM
When you first start exploring custom calculated fields in TestTrack, you might find yourself wondering what the differences are between the text and list item output types. Which type should you use since the end result is a text value in both cases?
[caption id="attachment_11580" align="aligncenter" width="256" caption="Calculated field with text output"][/caption] [caption id="attachment_11581" align="aligncenter" width="256" caption="Calculated field with list item output"][/caption]
While both types of calculated fields produce text as their output, text fields are more flexible in terms of the possible values the field can have—any combination of legal characters is allowed (up to 255 characters). List item fields are limited to one of the values in an associated list of text values. Does this mean that it's better to use text fields? Not necessarily. Which output type is better for you generally depends on the type of reporting, filtering, and sorting you want to do with your data.


Reports that group and count data, like distribution reports and Live Charts, work with predefined lists of values. If you want to use these types of reports with your custom calculated field then you must use the list item output type.
TextList Item
Live Chart
Distribution Report
Trend Report
List Report
Detail Report
External Report

Table: Field output types supported for different TestTrack report types

[caption id="attachment_11586" align="aligncenter" width="420" caption="Risk level is a calculated custom field using list item output"][/caption]


Your choice of output type determines your options when filtering in TestTrack. Text fields use a search mechanism for determining matching values. You can even do wildcard searches, which comes in handy when looking for matching values that have been calculated. List items match values by looking for the specific items you selected when you specified your filter criteria. This makes specifying the criteria very easy; simply select one or more values from the list. Don’t forget you can use the ‘Does not contain the following items’ option to exclude items from the filter results.


If you expect to sort your custom field alphabetically, then there is no difference between the text and list item output types. Both types work fine. List items do have an advantage if you want to use a different sort order. This is because lists in TestTrack let you specify your own sort order, and list item calculated fields use the sort order of the list they are based on. Risk and severity values are often configured to use a sort order that is not alphabetical. [caption id="attachment_11588" align="aligncenter" width="372" caption="Define list item sort order"][/caption] Happy configuring!