Example: Presenting a Dynamic Field List

This example demonstrates how you can present a different field list in a field, depending on the value of another field.

The user-defined function SW_SetLists_Environment checks the value of the Environment Specification field and assigns the appropriate field list to the Environment Type field.

This example assumes that the field lists have been defined in the project. For details, see Customize field lists.

Note: To use workflow scripts to change or create lists that can be assigned to fields, you must use the Open Test Architecture (OTA) interface.

Add code to the Bug_MoveTo event procedure so that the user-defined function SW_SetLists_Environment is called when the user changes focus in the defects module.

Add code to the Bug_FieldChange event procedure so that the user-defined function SW_SetLists_Environment is called when a user changes the value of the Environment Type field in the Defects module.

The user-defined function SW_SetLists_Environment checks the value of the Environment Specification field (BG_USER_02) and assigns the appropriate field list to the Environment Type field (BG_USER_01).