Previous Topic: dtlDateReadonlyNext Topic: dtlDropdownWithDesc


dtlDropdown

The dtlDropdown macro specifies a drop-down selection control on an HTMPL detail form. The control appears as a drop-down or lookup on the edit view of the form, and as the text in the read-only view.

Note: The CA Service Desk Manager administrator can specify the maximum number of entries a drop-down list should contain (default 10); when the size of a drop-down list exceeds this number, CA Service Desk Manager automatically converts the list to a lookup. You can override this behavior with the lookup property of this macro.

This macro has the following properties:

attr=attributeName

(Required) Specifies the name of the attribute associated with the control.

autofill=yes|no

Specifies whether the field allows autofill when it is displayed as a lookup. Autofill lets a user enter a value in the field by typing the first few characters of a value and pressing Tab. These actions cause the product to perform one of the following actions:

Pop up a selection form when the specified value is missing or ambiguous.

cbwidth=0|number

Specifies the width of the drop-down list in pixels. If omitted or specified as zero, the list automatically sizes to the width of its widest entry.

codename=string

Specifies the name of a set of values from the ui_selection object that are displayed in the date drop-down control. The values are those values with code attributes that match the value specified for codename.

colspan=1|number

Specifies the number of columns on the form.

default=text

Specifies the default value when the attribute is null.

evt=”eventName=’script’”

Specifies one or more HTML event handlers in the same way you specify them in an HTML statement, with quotes escaped as required. For example:

evt="onclick='myfunc()' onchange=\\\"myfunc2()\\\""

extraURL=string

Specifies a where clause predicate in URL format to restrict the contents of the control.

factory=name

Specifies the name of a Majic factory for the selection list. Defaults to the factory referenced by the associated attributes, and so is not typically required.

hdr=text

Specifies the text of the caption on the control; defaults to the DISPLAY_NAME of the attribute associated with the control.

id=string

Specifies the JavaScript identification of the control. This property is not intended for customer use.

initial=value

Specifies the initial selection in the drop-down list, overriding the value of the attribute in the database.

link=yes|no

Specifies whether the control on the read-only view is a link to detail for the value of the attribute.

list_display=attributeName

Specifies the common attribute name of the table. Effective only if use_list_display=1, codename is blank, and the factory, rel_attr_name, and whereclause properties are supplied.

list_orderby=attributeName

Specifies the order of the drop-down list. Effective only if use_list_display=1, codename is blank, and the factory, rel_attr_name, and whereclause properties are supplied.

lookup=yes|no

Specifies whether the field should automatically convert to a lookup if the number of entries in the drop-down list exceeds a configured value (typically 10).

make_required=YES|NO

Makes a field required when you specify YES regardless of whether the associated attribute is required at the object level. A required field forces the user to specify a nonblank value.

rel_attr_name=attributeName

Specifies the attribute from the referenced table that is stored. This property is required when use_list_display=1 is specified, codename is blank, and the factory, list_display, and whereclause properties are supplied.

size=20|number

Specifies the width of the input field.

title=text

Specifies the title for screen reader users.

use_list_display=0|1

Specifies whether the drop-down control should be built from an explicit query instead of from the referenced attribute. When use_list_display=1, the factory, list_display, rel_attr_name, and whereclause properties must also be supplied.

whereclause=string

Specifies a where clause.