Previous Topic: kt_Categories_TreeNext Topic: lsEnd


lsCol

The lsCol macro specifies a column on a list form. You define the contents of a list form with the lsStart, lsCol, and lsEnd macros. You can optionally include lsWrite and lsExport macros. For example:

<PDM_MACRO name=lsStart. . .>
<PDM_MACRO name=lsCol . .>
<PDM_MACRO name=lsCol . .>
<PDM_MACRO name=lsWrite . .>
<PDM_MACRO name=lsCol . .>
. . . 
<PDM_MACRO name=lsEnd>

HTML for the entire list is output by the lsEnd macro. The other list macros save information used by lsEnd to generate the list.

This macro has the following properties:

attr=attributeName

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

colspan=1|number

Specifies the number of columns on the form.

Note: This property is not used and is ignored. This property is retained for compatibility with previous releases.

common_name_option=yes|no

Specifies whether the column contains an SREL attribute. The common name of the referenced table when the list is exported replaces the attribute value.

disp_entities=yes|no

Specifies whether to display HTML entities (for example, &amp; or &#26237 in read-only view. This property has the following values:

display_attr=COMMON_NAME|attrName

Specifies the column from the referenced table that is displayed on the list for columns containing an SREL attribute. This property is ignored for columns that are not SRELs.

escape=C|HTML|JS|JS2

Specifies how the value of the column is escaped. This property has the following values:

export=yes|no

Specifies whether this column is exported when the user clicks the Export button.

export_hdr_default

Specifies the default header text. The list result export uses this property.

exportFmt=function

Specifies the name of a JavaScript function (without parentheses) that returns a string format code which controls formatting the column when it is exported. This property has the following function values:

exportHdr=text|DISPLAY_NAME

Specifies the header for the column when it is exported. You can specify the value as explicit text, or as the keyword value DISPLAY_NAME, which sets the header to the value of export_hdr_default.

export_hdr_default=text

Specifies the text of the export column header when exportHdr has the keyword value DISPLAY_NAME. You rarely must specify this property, which defaults to the display name of the attribute for the column.

fmtfunc=function

Specifies the name of a JavaScript function that formats the field for display. The function is passed as a single argument containing the value of the attribute, and must return a string that is displayed on the form.

hdr=text

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

hidden=yes|no

Specifies whether the column is invisible. A hidden column can be useful for Edit in List or export.

img=name

Specifies a JavaScript variable containing the URL of an image to display in the column. Set the JavaScript variable with a preceding lsWrite macro.

justify=left|center|right

Specifies the position of content within the columns.

keeplinks=yes|no

Specifies whether HTML links (Action: tags) are displayed as links or formatted as raw text. Preserves HTML links when the text to display contains HTML links. The default value is no.

keeptags=yes|no

Specifies whether HTML tags are interpreted as HTML links or formatted as raw text. keeptags=yes overrides the keeplinks property.

label=string

Specifies text for a label positioned to the left of data.

link=yes|no

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

max_char=0|number

Specifies the maximum number of characters to display in column.

nowrap=yes|no

Specifies whether to suppress wrapping of text in a call. When you specify nowrap=yes, text for the column is not permitted to wrap to multiple lines.

required=yes|no

Specifies whether text must appear in the column. When you specify required=yes and the attribute has no value, its value is replaced with "Not Available."

sort=ASC|DESC|no

Specifies the sort sequence of the list when a user clicks the column as follows:

startrow=yes|no

Specifies whether the column is the first one in the expansion section. This property works as follows:

style=string

Specifies CSS formatting for the column.

uid=string

Specifies an additional identifier to distinguish between columns with the same attribute. This property is not intended for customer use.

width=0|number

Specifies the maximum width of a column.