detailmaint Element

 

Content

detailmaint Element

Description

Example

Properties

Description

The detailmaint Element maintains a detail table for an SDI. This Element can add, edit, and delete data in the detail table. It also maintains many-to-many relationships between detail tables.

Example

See Sample Maintenance Page → Sample Details.

detailmaint Element Properties

Property Name Description
Mode Specifies whether the page is rendered in Edit (default) or View mode.

Edit lets you add, remove, edit, or resequence child data.

View is read-only.

Appearance Options to select the appearance of the Element (defaults to Standard).
Selector Type HTML input attribute used for selecting SDIs in the list:
ValueDescription
checkboxEquivalent to type=checkbox attribute of HTML input tag (allows selection of multiple SDIs).
radiobuttonEquivalent to type=radio attribute of HTML input tag (permits selection of only one SDI).
noneNo selection capability.
Table Name Database table that holds the relationship, which can be foreign key or many-to-many. If the table is an SDC table, never render it in Edit mode.
Auto Increment Detail Key Choose Yes if the identifier of the detail table is Auotkey-Generated. In this case, the detail key is incremented with the format:

DDDYYYY-S

where DDD is the day, YYYY is the year and S is the sequence.

When Autokey-Generated, only one detail key can be defined.

New Item Add Page Page to open for selecting new items (required only for many-to-many relationships), such as a lookup page that automatically opens when adding a new row.

If you specify a page, the detail key columns are required. Also, when a new detail item is added, a lookup will be opened for item selection.

If you do not specify a page, a blank row is appended and no lookup will open when adding new items.

Master Key Collection Defines a collection of primary keys for the master table. The order in which you specify these keys must be the same as the order returned by the lookup.
Property Name Description
IdentifierUnique identifier for this item, rendered as an ID attribute in the HTML tag.
Column NamePrimary key of the master SDC that is mapped to the detail table.
Request Param MappingSpecifies that the request parameter of the page will be mapped to the foreign key of the detail table.
Detail Key Collection Specifies the primary keys of the detail table. The order in which you specify these keys must be the same as the order returned by the lookup.
Property Name Description
IdentifierUnique identifier for this item, rendered as an ID attribute in the HTML tag.
Column NameIdentifier of the columns comprising the primary keys.
Tab Properties of the tab that encloses the detail element:
Property Name Description
ShowYes (default) displays theElement.
TextText displayed in the tab header.
WidthWidth of the tab in pixels (defaults to the size of the tab).
body WidthWidth of the content body (text area beneath the tab). The default is 100%.
body HeightFixed height of the content body. A scrollbar is added as required.
ExpandableYes (default) allows the tab to be expanded and collapsed. No disables this feature and the tab is always expanded.
ExpandedYes (default) initially expands the tab if Expandable property is set to Yes.
HighlightYes (default) highlights the tab on a mouseover event. The CSS defines this.
TipHelp text to appear on mouseover.
IDIdentifier of the Element (defaults to the Element name).
GroupDefines a tab group. See Tab Groups and Field Groups in the maint Element.
Button Placement Determines button position within the tab. If you leave this property blank, the buttons are not displayed.
Buttons Properties of the buttons for the detail element:
Property NameDescription
IdentifierUnique identifier for this item, rendered as an ID attribute in the HTML tag.
ShowYes (default) shows the button.
TextText displayed on the button.
WidthWidth of the button in pixels (defaults to the width of the text on the button).
FunctionJavaScript to execute for an onclick mouse event.
TipHelp text to display for an onmouseover button event.
ImageURL of the image displayed on the button.
AppearanceOptions to select the appearance of the button. If you leave this blank, it defaults to standard.
MarginMargin of the button in pixels.
styleChoose a style, or specify a CSS if you need to define button style using a stylesheet.
HighlightYes (default) highlights the button on mouseover. The CSS defines this.
Columns Properties of the columns displayed in the detail element:
Property Name Description
IdentifierUnique identifier for this item, rendered as an ID attribute in the HTML tag.
ColumnIdentifier of the column in the detail table.
titletitle displayed as the column header. Clicking the header of a column selects all fields in that column.
WidthWidth of the column in pixels.
AlignAlignment of the column (the default is left).
ModeDisplay format of the column (defaults to readonly).
Validation Client-side validation rules for text entered into input fields:
ValueInput Required
Mandatory Any string. If you specify Date, Length, Number, Integer, or Decimal (below), the input must conform to those requirements.
Date A LabVantage-defined "date" data type.
LengthA LabVantage-defined "string" data type of specified length. Specify the length within a range. Range values are inclusive. For example, a range of 6 to 12 means that the string length must be 6, 12, or any integer between.
Number
Integer
Decimal
A LabVantage-defined "number" data type of the specified kind (number, integer, or decimal) and length. Specify the length within a range as you would when specifying a Length (above).
NOTE: The maint Element has built-in client-side validation. The following varchar fields are rejected:
Columns Containing
SDI KeyId
All Other
Columns
' (single quote); (semicolon)
" (double quote)
\ (backslash)
| (pipe)
; (semicolon)
[] (square brackets)
Link URL Specifies attributes of a hyperlinked column:
Property NameDescription
HRefURL specifying the destination of the hyperlink (page to open when clicked).
Target Name of the window in which the child page opens in response to an onclick (default is _self):
ValueOpens in...
_selfSame window
_parentCaller window
_blankNew window
_topBrowser window
TipHelp text displayed on mouseover.
PseudoThis is a "pseudocolumn". A pseudocolumn is a column that is rendered on the page, but does not exist in the SDC. Do not choose a database columnid when specifying a pseudocolumn. If you want to access this pseudocolumn using a JavaScript function or another pseudocolumn, specify an identifier of your own choice.

This value you enter can be HTML, a Variable, or an Expression (see Variables). For example:

If you enter an HTML image tag, then specify a link (using the Link URL property above), the image becomes a hyperlink.
If you use a variable, the variable must point to one of the columns defined by the Column Id property. In this case, you can hide the actual column so that only the pseudocolumn is displayed. For example, you could specify Date: [moddt] to display the date and time a Sample was last modified (such as Date: 8/1/2003 15:36:24), but only if you have previously chosen moddt as one of the columns to be rendered.
Display ValueValues displayed in place of the corresponding retrieved values. Separate each with a semicolon. For example, if you retrieve values from the createby column, you could specify JDrake=JD. All values retrieved as JDrake would then be displayed as JD. This works only if you replace the entire retrieved string (it does not work on partial strings).
Link Reftype IDSpecify either a Reference Type identifier, or a semicolon-delimited list of Reference Values to display in as a dropdownlist or dropdowncombo.
Lookup URLURL of the page to open as a lookup. This works only if the Mode property of the column is "lookup".
Disable on SaveYes disables the column when the page initially loads. Any added row will have this column enabled for editing. By default, the column is editable.
Date Format Format in which date/time is displayed, as determined by the user's Locale. For information about how LabVantage handles Locale, see Locale and Time Zone in the topic Internationalization and Localization.

The popup calendar and all date validation routines recognize and function with the chosen format.

If you choose a format that specifies only date (without time), the time defaults to midnight in your time zone. Be advised that this could be a day earlier for a user in a different time zone.

Dropdown SQL SQL script that retrieves data when the Mode property (above) is set to dropdownlist. If two columns are selected, the first column is used as the actual data, and the second column is used as the Display Value.

For example, if you setup a sampledesc column in dropdownlist mode, then specify the DropdownSQL script

select s_productid, productdesc from s_product

the maint Element should render a dropdown list of productdesc for the sampledesc field. If the query is

select s_productid from s_product

the Element should render a list of Product SDIs.

Translate Value"Yes" translates all values in the column (see Translating Properties in section 2 Properties Overview).
Default ValueValue displayed when a new row is added. The default column mode for this property is "input".
Dropdown DefinitionIf the Mode is dropdownlist, this retrieves data based on an SDC definition:
Property NameDescription
SDC IdThe SDC for which data is retrieved.
Query FromValue of the From clause for the query.
Query WhereValue of the Where clause for the query.
Query Order ByValue of the Order By clause for the query.
Value ColumnActual column value.
Display ColumnColumn value displayed to users.
Sort by Sort order of the detail element rows:
Property Name Description
IdentifierUnique identifier for this item, rendered as an ID attribute in the HTML tag.
ColumnIdentifier of the column by which to sort.
OrderSort order (ascending or descending).
Legend Block Specifies properties of a legend used to identify arcane icons:
Property Name Description
New Item SymbolIcon image file.
TextText that identifies the icon image.
Restrictive Where Clause This is an additional where clause that specifies additional search criteria for all queries executed from the Element.
JavaScript Includes JavaScript file to include in the Element. When specified here, the script does not have to be included in each Page that uses this Element.
Property Name Description
Javascript Source FileURL of the JavaScript (*.js) file to include in the Element.