Creating Enumerated Fields
The order in which enumerated values appear in list boxes in the Query and other dialog boxes is the order in which they appear in the Add Field or Modify Field dialog box. This can be a code order or even alphabetic order, but only if they appear in that way in the dialog box. You can use drag-and-drop to rearrange the values.
To create a custom enumerated field, do the following:
-
Select [Component] > Advanced > Customize. [Component] corresponds to the component for which you are creating a property field.
The Customize dialog box opens
-
Review the Customize dialog box to find the fields that can be customized. The fields and icon graphics accompanying them are as follows:
- A field with a pencil in the center of the icon is an application field. It is always an enumerated type and is fully customizable. You can add, disable, rename, and reorder its values.
- A new field icon displays the head and shoulders of a person. It can be one of several types and is fully customizable. If the new field is disabled, the icon is greyed-out.
- An application field with an icon containing a small yellow lock in the lower left corner is a restricted enumerated type. You can change only the names the application displays for the values of this field.
-
Click Add.
The Add Field dialog box opens.
-
Type the name for the new field to be used by the database in the Field name field. Use only alphanumeric characters and no spaces in this name. The name should be less than 31 ASCII characters (including Usr_) and not contain the following characters, which are not accepted by one or more of the databases that the application supports:
= \\.^$@,;!:#*&<>?-//%|[](())+"
Note: Be careful about selecting the field name, as it cannot be changed once you click OK.
-
Type the name that the application will display to users in the Display Name field.
- Select Enumerated from the Type list.
- Click Add to enter the first value. The Add Value dialog box opens. StarTeam reserves the numeric codes from 0 to 100, so this dialog shows numbers starting with 101.
- Use the displayed code or type another in the Code text box.
- Type the name for this enumerated value in the Name text box and click OK.
- Use drag-and-drop to arrange the values in the Possible Values list box.
- Select Supports multi-select to provide users with the ability to select more than one value.
- In the
Default Value box select one or multiple enumerated values as the default for users to select. This value automatically becomes the value used for all existing items that have the field as a property. It also becomes the default value for newly created items. You can change this value manually on the
Custom tab of the item
Property dialog box.
Many users create a value of <none> to use as the default, to indicate that no value is really being set. They also place this value first in the enumerated list, so that it displays at the top or bottom of the upper pane when the column for the field is sorted. If you are entering a date or time, use the appropriate format for your locale.
- Optionally: After you have added the values, you can arrange them hierarchically and sort the values in parent/child relationships as desired.
- In the Possible Values list, select a code and click Edit. If you are adding a new value, click Add.
- Select
Make child of and choose a value in the list to arrange the values in parent/child arrangements.
Tip: Alternatively, you can also drag and drop the values in the list to arrange them hierarchically. When dragging a node, it becomes a sibling of the node it is dropped onto, and it is placed immediately after that node.
- Click OK.
- Verify that the codes you have selected are the ones that you want. They cannot be changed once you exit the dialog box and click OK.