Control Properties

This article contains the following topics:
casm172
This article contains the following topics:
 
Attribute
The Attribute property specifies the field in a CA SDM table that is associated with the control. To set this value in the Properties dialog, click the Browse button that displayed at the right side of the selection box when you click on the cell to the right of the Attribute property. Then select the attribute you want from the Select Attribute tree, and click Select.
Autofill
The Autofill feature verifies and completes a lookup field before the form is submitted. If a user clicks the hyperlink and the text specified is sufficient to identify a value in the underlying table, the pop-up search form is suppressed and CA SDM fills in the value. Autofill is also activated when a user types a new value into a lookup field and presses Tab. This causes CA SDM to query the server for a list of all records eligible for the lookup field whose first few characters match the value specified. If it finds a match, it copies the full value into the field. If it finds more than one match, it pops-up a selection form.
The Autofill property is provided for dropdown fields because CA SDM can automatically convert a dropdown field to a lookup when the number of items exceeds a configurable threshold (see the Lookup property).
You can set the Autofill property for a dropdown box, hierarchical lookup box, or a lookup box control in the Properties dialog. To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Autofill property in the Properties dialog. No means that the control will not be filled in automatically when you tab out of it. True is the default Autofill value.
Caption
The Caption property specifies the header label that is displayed above a control. To specify this property, enter the desired value in the cell to the right of the Caption property in the Properties dialog.
Notebook tabs and list columns also have captions. Specify them on the Notebook or List Designer that replaces the Properties dialog for these controls.
You can set the caption for a menu item from the Menu Designer dialog. To do so, select the appropriate item from the list and enter text in the Caption text box.
Column Span
CA SDM lays out controls on a detail form or a search filter in a HTML table, with controls in rows and columns of the table. The Column Span property specifies the number of columns occupied within the table by a control. To specify this property, enter the desired numeric value in the cell to the right of the Column Span property in the Properties dialog.
You can set the column span for a control from the Properties dialog. To do so, enter an integer in the cell to the right of the Column Span property.
Condition
The Condition property sets the conditional logic for the Conditional If and Conditional Else If controls. To specify this property, enter the desired logical condition in the cell to the right of the Condition property in the Properties dialog.
The syntax of the Condition property is as follows:
  • 0 is false; any other number is true
  • "" is false; “any-string” is true
  • “value op value” evaluates the left and right values against each other according to op. If both values consist of digits (optionally preceded by - or +), the comparisons are done numerically. Otherwise, they are done lexically (ASCII collation). Valid op values include:
op values
What it means
==
Equal to
!=
Not equal to
>=
Equal to or greater than (must be written as \>= or >=)
<
Less than (must be written as \< or &lt;)
>
Greater than (must be written as \> or &gt;)
<=
Equal to or less than (must be written as \<= or &lt;=)
&
Performs a bit-and of the left and right values. True if any bits are set; false if none are set
%
Returns true if the left value is an even multiple of the right value, and false otherwise (useful for building two-dimensional tables).
:
Performs a byte-oriented pattern match like the UNIX grep command. It returns true if the left value contains the regular expression defined by the right value
For example:
<PDM_IF $count \>= 10> . . . <PDM_ELIF $count &#60; 5> . . . <PDM_ELSE> . . . </PDM_IF>
A condition can include connectors, either && (and) or || (or). There is no precedence for either connector. The web engine examines a conditional from left to right until it reaches a connector. If the initial condition is true and the connector is ||, it considers the entire condition to be true without further evaluation. If the initial condition is false and the connector is &&, it considers the entire condition to be false without further evaluation. Otherwise, it considers the condition undermined, and evaluates the conditional from after the connector.
Default
The Default property specifies a default value for a dropdown field when the associated attribute is empty. To specify this property, enter the desired value in the cell to the right of the Default property in the Properties dialog.
When this property is specified and the underlying attribute has an empty value (normally only when a new record is created), the select box has the specified value automatically selected. This property has no effect if the specified value does not correspond to one of the selections in the dropdown, or if the field is displayed as a lookup. This property is optional; if omitted, the default for an empty attribute is to leave it empty.
Disabled
The Disabled property specifies whether the control is disabled on initial display. A disabled control is displayed in gray text, and the user can neither select it nor enter text into it.
To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Disabled property in the Properties dialog. To specify that a control should be disabled by default, select Yes for this property. A disabled control can be enabled only by JavaScript executed after the form is displayed.
If you specify Yes for the Disabled property in a textbox in the search filter part of a list form, you must also specify values for the QBE Condition, QBE Display, and QBE Value properties.
Event
The Event property specifies one or more event handlers to be associated with the attribute.
To specify this property, enter the desired value in the cell to the right of the Event property in the Properties dialog. Specify the value in the same format, as it would appear on an HTML statement, except that any double quotes in the handler string must be prefixed by three backslashes. For example, the Event property for the Request Area control on form detail_cr.htmpl is:
onChange=\\\"change_category_func('cr')\\\"
This specifies that the JavaScript function change_category_func(‘cr’) should be invoked whenever the value of the field changes.
You can specify multiple event handlers in the same Event property by separating them with spaces. Consult HTML or JavaScript documentation for a list of available event handlers and their usage.
Factory
The Factory property specifies the CA SDM table referenced by a field in a lookup or dropdown control. This property is normally left blank, meaning that the factory defaults to the one associated with the attribute in the CA SDM object definition. It is seldom necessary or useful to override this value.
To specify this property, select the desired value from the dropdown displayed when you click in the cell to the right of the Factory property in the Properties dialog.
Function
The Function property of a menu item specifies the JavaScript invoked when the user selects the item. To specify this property, enter the desired value in the cell to the right of the Function property in the Menu Designer dialog. Any valid JavaScript can be specified for Function, except that double quotes must be preceded by a backslash.
The following predefined JavaScript functions may be useful:
  • upd_frame(form)
    Loads a new form into the main window content frame.
  • create_new(factory, use_template, width, height [,args])
    Pops-up a form to define a new record.
  • popup_window(name, form[, width, height [,features [,args]] ])
    Pops-up a new window.
  • showDetailWithPersid(persid)
    Pops-up a detail record.
In the above functions:
  • form
    Is either an HTMPL file name of the form xxx.htmpl or an operation code (example: CREATE_NEW).
  • factory
    Is the name of a database object.
  • use_template
    Specifies whether or not the new object should be created with a template that the user must select from a list. It can either be true or false.
  • width
    Is the desired form width in pixels or zero for default.
  • height
    Is the desired form height in pixels or zero for default.
  • features
    Is a list of window features, in the same format as used with the JavaScript window.open() function.
  • args
    Is one or more arguments of the form "keyword=value" for the operation specified for form.
  • persid
    Is a persistent ID in the form factory:id.
ID
The ID property sets the HTML or JavaScript id of the command button, tab, or read-only text box controls for use in JavaScript that references the control. To specify this property, enter the desired value in the cell to the right of the ID property in the Properties dialog.
Initial
The Initial property specifies the initial value of a dropdown field. When this property is specified, the database value of the attribute associated with the control is ignored and the select box has the specified initial value selected.
To specify this property, enter the desired value in the cell to the right of the Initial property in the Properties dialog. The specified value should correspond to one of the selections in the dropdown; if it does not, the initial value for the dropdown is empty. This argument is optional; if not specified, the dropdown displays the database value of its associated attribute.
The Keep Links property specifies whether or not HTML Action: tags within a text box on the read-only view of a detail form are displayed as hyperlinks or as simple (non-clickable) text.
To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Keep Links property in the Properties dialog. Specify Yes for this property to specify that Action: tags should be displayed as hyperlinks. Specify the default value of No to specify that Action: tags should be displayed as literal text. HTML tags other than Action: tags are always displayed as literal text (unless the Keep Tags property is specified).
The Keep Links property is ignored if the Keep Tags property is specified as Yes. Note that this property affects only the read-only view of a detail form. HTML is always displayed as literal text in Edit view.
Keep Tags
The Keep Tags property specifies whether or not HTML tags within a text box on the read-only view of a detail form are formatted as HTML or as simple (non-clickable) text.
To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Keep Tags property in the Properties dialog. Specify Yes for this property to specify that HTML tags should have their normal effect. Specify the default value of No to specify that HTML tags should be displayed as literal text.
A value of Yes for Keep Tags overrides the Keep Links property. Note that this property affects only the read-only view of a detail form. HTML is always displayed as literal text in Edit view.
The Link property specifies whether or not a Dropdown, Lookup, or Read Only Lookup field should be displayed as a clickable hyperlink in the read-only view of a detail form. A user can click on a field displayed as a hyperlink to show the detail of the record referenced by the field.
To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Autofill property in the Properties dialog. Select the default value of Yes to specify that the field should be displayed as a link on the read-only view; specify No to specify that the field should be displayed as simple non-clickable text on the read-only view.
Lookup
The Lookup property specifies whether or not a Dropdown control is converted into a Lookup control if the number of entries for the Dropdown control is exceeds an installation-specified threshold (normally ten).
To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Lookup property in the Properties dialog. Select the default value of Yes to specify that the Dropdown control should become a lookup control if the number of entries in the dropdown exceeds the threshold. Select No to specify that the control should always remain a dropdown, regardless of how many entries it contains.
Max Length
The Max Length property specifies the maximum number of characters that can be typed in the Textbox control. This property is normally left blank, meaning that the maximum defaults to the actual length of the database column associated with the textbox.
To specify this property, enter the desired numeric value in the cell to the right of the Max Length property in the Properties dialog.
Off
The Off property sets the value that is displayed on read-only screens when a checkbox value is false. To set this value, enter text in the cell to the right of the Off property.
On
The On property sets the value that is displayed on read-only screens when a checkbox value is true. To set this value, enter text in the cell to the right of the On property.
OP Code
The Op Code property specifies the SQL select operator used with the value of a dropdown on a search filter. The value must be a character string beginning with “QBE.” followed by an operator chosen from:
Operator
Description
EQ
equals
NE
not equals
LT
less than
GT
greater than
LE
less than or equals
GE
greater than or equals
IN
LIKE
The default value of QBE.EQ specifies that the search filter should select rows where the attribute associated with the control exactly matches the value selected from the dropdown.
To specify this property, enter the desired value in the cell to the right of the OP Code property in the Properties dialog.
Option ID
The Options ID sets the HTML or JavaScript id of the option buttons for use in JavaScript that references the control. To specify this property, enter the desired value in the cell to the right of the Options ID property in the Properties dialog.
Preview
The Preview property specifies whether or not to show the Quick View mode in the dtlHTMLEditBox. To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Preview property in the Properties dialog. Select the default value of Yes to specify that the dtlHTMLEditBox control will have the quick view mode. Select No to specify that the control will have only the HTML source mode.
Preview Clause
The Preview Clause property specifies a where clause to retrieve data for the form. WSP uses this where clause to retrieve data to be displayed on the form when it is previewed. If no preview clause is specified, WSP finds the most recently added row in the table associated with the form, and displays that data on the previewed form.
Preview Mode
The Preview Mode property specifies how the form will be previewed during preview mode. To set the Preview Mode of the form, select edit or read-only from the dropdown list to the right of the Preview Mode property. Edit is the default Preview Mode value. If you are previewing the form, in read-only mode, you will not be able to edit any of the control boxes on the form. If the Preview Mode is set to edit, you can edit the control boxes.
Preview URL
The Preview URL property specifies the preview URL. This can be an HTMPL file name, in the form xxxx.htmpl; a CA SDM URL (used unaltered if it begins with “OP=”); or the keyword “no”, indicating the form cannot be previewed. A value not beginning OP= is modified by replacing a reference of the form {factory} or {factory:} with an id or persistent id (respectively) of the most-recently created row from the referenced factory that you are authorized to see.
QBE Condition
The QBE Condition property specifies the SQL select operator used with the QBE Value property of a disabled textbox field on a search filter. The value must be a character string chosen from:
Operator
Description
EQ
equals
NE
not equals
LT
less than
GT
greater than
LE
less than or equals
GE
greater than or equals
IN
LIKE
For example, a value of IN specifies that the search filter should select rows where the attribute associated with the disabled textbox control matches the QBE Value property according to the rules of an SQL LIKE comparison.
To specify this property, enter the desired value in the cell to the right of the QBE Condition property in the Properties dialog.
QBE Display
The QBE Display property specifies the value displayed to the user for a disabled textbox field on a search filter. To specify this property, enter the desired value in the cell to the right of the QBE Display property in the Properties dialog.
QBE Value
The QBE Value specifies the value used for comparison in the portion of an SQL select where clause generated from a disabled textbox field on a search filter. The generated where clause includes a portion selecting rows where the attribute associated with the control compares with the value specified for QBE Value using the operator specified for QBE Condition.
To specify this property, enter the desired value in the cell to the right of the QBE Value property in the Properties dialog.
Read Only
Like all other detail controls in detail form, when you are in read only mode you are not able to edit the control.
This parameter is ignored when Bound is set to Yes.
Rows
The Rows property specifies the number of rows that a text box control or a HTML editor will occupy on a form. To specify this property, enter the desired numeric value in the cell to the right of the Rows property in the Properties dialog.
This property is available only for text boxes on the detail form and not for text boxes in the list forms.
Size
The Size property specifies the width of the control in pixels. If this property is left blank, the control is displayed at whatever width is required to hold its data.
To specify this property, enter the desired numeric value in the cell to the right of the Size property in the Properties dialog.
Spell Check
The Spell Check property specifies whether or not a Textbox control should have Spelling button to the right of its caption to allow the user to spellcheck the contents of the text box. To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Spell Check property in the Properties dialog. Select Yes to specify that a Spelling button should be displayed; select the default value of No to specify no button.
Time
The Time property specifies whether or not the time will be displayed along with the date for the Date and Read Only Date controls. To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Time property in the Properties dialog. Select the default value of Yes to specify that the time should be displayed; select No to specify that only the date should be displayed.
Title
The Title property specifies the title of the element.
To specify this property, enter the desired value in the cell to the right of the Title property in the Properties dialog.
Toolbar
The Toolbar property specifies which toolbar set will be shown in the HTML Editor associated to the dtlHTMLEditBox control.
  • tmpl
    Displays the toolbar set for document template editor.
  • reportcard
    Displays the toolbar set for report cards editor.
  • default
    Displays the default toolbar set.
Tooltip
The Tooltip property specifies the text displayed when the user places the mouse pointer over a control item.
To specify this property, enter the desired value in the cell to the right of the Tooltip property in the Properties dialog.
Where Clause
The Where Clause property specifies a where clause to select the values included in a Dropdown control on a detail form. This property is optional; if left empty, a dropdown on a detail form includes all rows from the table referenced by the attribute associated with the control.
To specify this property, enter the desired value in the cell to the right of the Where Clause property in the Properties dialog.
Wildcard
The Wildcard feature enables a wildcard search for Lookup and Hierarchical Lookup boxes on a List form. A wildcard search is equivalent to adding the "%" symbol around a text string when performing a search. For example, using the string %option% when performing a search on a text field, would retrieve all of the records that contain the word "option" in that text field. To specify this property, select Yes or No from the dropdown displayed when you click in the cell to the right of the Wildcard property in the Properties dialog. Yes means that the control will automatically have the wildcard property enabled. No is the default Wildcard value. If this option is true, the % symbols are no longer required on searches.
Width
The Width property specifies the width of a button control in pixels. If this property is left blank, the control is displayed at whatever width is required to hold its data.
To specify this property, enter the desired numeric value in the cell to the right of the Size property in the Properties dialog.