Creating a list box for a new attribute

About this task

You can create list boxes for newly created attributes. The syntax for creating new list boxes is as follows:

attr_name:attr_type[:[label][:#textlines]] |
attr_name:attr_type[:[label]:[#textlines]:values_ref]

where values_ref is defined in a new values definition entry, in a separate attribute.

Each values_ref values definition entry must be defined in a separate text attribute on an object or type called info_attrs.values_ref, where values_ref is the name of the list of values referred to in the info_attrs definition. This allows the list of values to be easily populated from external tools.

A values_ref must be a legal attribute name because it becomes part of the name of an attribute. A values_ref attribute name is limited to 21 characters because the limit on the length of an attribute name is 32 characters and 11 characters are used by the string, info_attrs.

The contents of an info_attrs.values_ref attribute must be a newline-separated list of possible values.

A value in a value list may be any ASCII string with embedded white space allowed, but no leading or trailing white space (since such white space will be considered part of the newline delimiter).

Example

Suppose you want to add a custom attribute to the task type called approval_level and the possible values for this attribute are from the list:

new
" pending
" approved level 1
" approved level 2

You could create an entry in the info_attrs attribute on the task type as follows:

approval_level:string:Approval Level::approval_values

You could then create an attribute on the task type called info_attrs.approval_level with these contents:

new
pending
approved level 1
approved level 2


Feedback