maint Element |
|
Content |
|
maint Element Tab Groups and Field Groups in Maintenance Forms Tab Groups in Maintenance Grids |
Description |
The maint Element lets you view and edit SDI column values and add SDIs.
Options |
SDI Information can be presented in a form (single SDI) or grid (multiple SDIs) style defined by the LabVantage CSS, in editable or view-only mode, with flexible control over column attributes.
When used to add SDIs, the new SDIs can be based on an SDI Template.
Example |
maint Element Properties |
Property Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SDC | Identifier of the SDC for SDIs displayed in the Maintenance Form or Grid. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
style | Determines how SDIs are displayed based on page functionality:
Functionality of the form and grid are identical. This property determines only which class in the LabVantage CSS renders the style. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Form Columns | Number of columns displayed on each row. This applies only to the Form
style (above). For example, if you are displaying values from the s_sampleid
and createdt columns:
Form Columns = 1
Form Columns = 2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fixed Columns | Generates a Maintenance Grid that scrolls horizontally (for display of
multiple SDIs) with left-most columns remaining stationary. Enter the number
of stationary columns here. Selecting cells by clicking and dragging causes
the page to scroll automatically.
If a the content of a Maintenance Grid is larger than the page area, scrolling the grid (horizontally or vertically) maintains the column and row headers at the top of the page. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
View Only | Yes renders the element to make it viewable only. The user can not interact with anything in the element. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
EventNotify | A value of "true" or "false" either posts or does not post an EventNotify Action onto the ToDo List when the result set loads. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Template Id | If you are using one of the Maintenance Grid styles (defined by the style property above), you can specify an SDI Template here. Each time you add a row to the grid, the row is populated with values from the SDI Template. The Template Id is passed to the sdirow tag. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Columns | Specifies attributes of columns on the Maintenance Form or Grid.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Texts | Substitutes your text in place of the default text rendered on the page.
All of this text is displayed in response to failure of client-side validation
according to rules set by the Validation
property (above).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tab Text | Alternate text to display on the tab instead of the default, which uses the singular or plural SDC name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Show | Determines whether or not to display the Element on the page. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enable Dynamic Audit | Determines if "Dynamic Auditing" is enabled for the Page Type.
See Dynamic
Auditing for a complete description of this feature with examples.
Alternatively, this property can be left blank, in which case the "Enable Dynamic Audit" property setting in the MaintenanceForm Page Type is used. |
Data Locking |
LabVantage locks data being accessed by another user. For current data locking strategy, see Data Locking Strategy in section 2 Properties Overview.
JavaScript Functions for Maintenance Grids |
The following JavaScript functions deal with Maintenance Grids. These are in WEB-CORE\elements\scripts\maint.js. See WEB-CORE\pagetypes\maint\scripts\mainpage.js for examples. Note that the elementid parameter lets you work with multiple grids on the same page.
Function | Description | |||||||
deleteGridRows( elementid ) | Removes a row from a Maintenance Grid identified by elementid. This does not delete the SDI. | |||||||
addGridRows( elementid, copies ) | Adds rows to a Maintenance Grid:
|
|||||||
removeGridRowsFromLink( elementid, linkcolid, newvalue ) | Removes rows from the Grid, or reassigns them to another column. This
is designed for use with linked SDIs:
|
Maintenance Grid Copy and Fill Features |
In Maintenance Grids, right-clicking in a cell opens a Shortcut Menu, which provides the functionality described below. Clipboard shortcut keys are also supported. See Navigator Policy → Using the Edit Set Navigator (Step 6) for more information.
Menu Item | Description | ||||||
Cut | Cuts the contents of the cell that currently has focus. This behavior is subtly different in Chrome and Internet Explorer (see Navigator Policy → Using the Edit Set Navigator (Step 6)). | ||||||
Copy | Copies the contents of the cell that currently has focus. This behavior is subtly different in Chrome and Internet Explorer (see Navigator Policy → Using the Edit Set Navigator (Step 6)). | ||||||
Paste | Copies the contents of a cell that has been Cut or Copied to the cell that currently has focus. This behavior is subtly different in Chrome and Internet Explorer (see Navigator Policy → Using the Edit Set Navigator (Step 6)). | ||||||
Fill Down | Copies the contents of the cell that currently has focus to all selected
cells in the same column of the rendered Element. To use:
|
||||||
Fill Across | Copies the contents of the cell that currently has focus to all selected
cells in the same row of the rendered Element. To use:
|
||||||
Increase Down | "Increase Down" works with text, numeric, and date fields.
Text and numeric fields can be increased by integer. Date fields can be
increased by days, hours, or minutes as shown below.
|
These features are also provided:
Feature | Description |
Select Column | Clicking the header of a column selects all fields in that column. |
Related Fill-Down | Based on the columns defined in the Lookup Columns collection, a lookup column will fill-down any related columns when the primary column is filled-down. For example, if you look up a ProductId on the Sample Maintenance page that returns the Product Version and Product Description as well (defined in the "Lookup Columns" collection and "Map to Column" property), filling-down the ProductId also fills-down the Product Version and Description even if they are read-only. |
Behavior of onChange Events in maint Elements |
In response to an onChange event, the maint Element (as well as Data Entry Elements) execute a default JavaScript function. You can substitute your own function, or execute yours in addition to the default function.
For the syntax required to do this, see the onchange attribute of the LabVantage Custom Tag sdiinput (LabVantage uses this tag to render HTML input form controls).
Tab Groups and Field Groups |
Tab Groups and Field Groups in Maintenance Forms |
The style property contains the "FormWithTabGroups" and "FormWithFieldGroups" options. In Maintenance Forms, these tell the Element how to interpret the Group property, i.e., whether it is rendering columns in groups of tabs or fieldsets.
For each Columns property collection, the Group property defines breaks between each Tab Group or Field Group. For example, if you are rendering tabs, three Groups defined as A, A, and B renders two groups of columns on Tab A, and one group of columns on Tab B.
Tab Groups define groups of tabs rendered by the <sapphire: tabgroup> tag. Field groups do not require a tag.
Tab Groups (implemented with either the <sapphire: tab> or <sapphire: tabgroup> tag) re-select the selected tab after a save. This "memory" of the selected tab should reset when a user first enters a MaintenanceForm page.
If a Column Id is not specified in the Group property, the primary key is used as shown below.
NOTE: | PK indicates primary key (SDI KeyId1)
- indicates no value |
Column Id | Group | Form with Tab Groups | Form with Field Groups | |||||||||||||||
1 2 3 4 |
A A B B |
|
A
B
|
|||||||||||||||
1 2 3 4 |
A - B - |
|
PK
A
B
|
|||||||||||||||
1 2 3 4 |
- - B B |
|
PK
B
|
|||||||||||||||
1 2 3 4 |
A A A A |
|
A
|
|||||||||||||||
1 2 3 4 |
- - - - |
|
PK
|
|||||||||||||||
1 2 3 4 |
B A - B |
|
PK
A
B
|
Tab Groups in Maintenance Grids |
Tab Groups in Maintenance Grids are configured in a manner similar to Tab Groups and Field Groups in Maintenance Forms. The style property contains the "GridWithTabGroups" option. In Maintenance Grids, this tells the Element how to interpret the Group property to allow columns to be separated into tab groups.
As an example, consider the maint Element on the Sample Maintenance page with three Product columns in a single "Product" Group:
![]() |
This inserts the Tab Group into the Grid:
![]() |
Note that if you set the Mode to "FormWithTabGroups", selecting more than one row in the Navigator or SDI List page dynamically switches to the "GridWithTabGroups" mode. In other words, your Tab Group will appear on both the Maintenance Form and the Maintenance Grid as shown below.
![]() |
The Fixed Columns property determines columns that are fixed across all tabs. For example, if "Fixed Columns" is 1 and s_sampleid (keycolid1) is the first column, it will appear on all tabs. If you do not set a Group property for a column, that column uses the SDC Id (which is the default Group). This is consistent with "FormWithTabGroups" behavior. Additionally, the scroll grid is automatically activated if the "Fixed Columns" property is applied, and will work across all tabs.
NOTE: | All columns and fields are actually rendered. Selecting a tab simply hides and shows the relevant columns in the table. Therefore, any JavaScript or code that accessed columns or fields in previous LabVantage versions will continue to work as it did previously. |
Protection of SDI Columns at Completion of Life Cycle |
NOTE: | The behavior described in this section applies to LabVantage 8.4.1 and higher LabVantage 8.4.x Maintenance Releases. |
As provided in the OOB configuration, the maint Element for selected SDI Maintenance pages is configured to automatically render in view-only mode if the Status of the SDI indicates completion a life cycle. This is done for the following SDCs:
SDC | Renders View-Only if Status is: |
Sample | Completed (when Review is not required) or Reviewed |
Batch | Released |
Request | Released |
QCBatch | Completed or Reviewed |
MonitorGroup | Released |
StudySDC | Completed |
Study | Completed |
Incident | Completed or Closed |
Action Plan | Closed |
Formatted Text Editor |
Rendering a Formatted Text Editor |
The formattedtext Column Mode lets you render a Formatted Text Editor in an SDI Maintenance page.
Printing Jasper Reports |
To print a Jasper Report containing text from the Formatted Text Editor:
• | Format the column using the format method of the scriptlet class, e.g., $P{REPORT_SCRIPTLET}.format($F{CLOBCOLUMN}). |
• | Set the "Markup" property to "HTML". |
• | Enable the "Stretch With Overflow" property. |
• | Set the "Field Class" property on the database field to "Java.Lang.String". |
Editable Foreign Key Columns |
Foreign key (FK) columns can be edited by adding (or selecting an existing) FK column, then selecting an appropriate "Mode" for the column. If "Mode" is left blank, the column is rendered as read-only (primarily for backward-compatibility).
The example below shows the maint Element in the Sample List page, which defines a FK reference to the Product SDC. In this example, we add a "Product Cost" column rendered in "input" Mode.
![]() |
To see the FK column, associate the primary key (Product) with the Sample. After saving, the editable FK column is rendered. After entering a value for the FK column and saving, the primary and any related FK column data are also updated. The retrieval of the related FK fields (such as Product data) creates another RSet and stores it with the primary RSet. The FK RSet is pinged and released with the primary RSet. Clearing the primary key for the FK (Product) also clears and disables related FK fields.
![]() |
When editing multiple SDIs in a Maintenance Grid, related FK columns are connected. In the example below, both Samples are associated with the same Product. If you change the Product Cost in one Sample, all Samples associated with the same Product also change accordingly. Visually, the values are automatically updated as you type.
![]() |
Editable TrackItem Columns |
This functionality is currently available (hardcoded) only for the Sample SDC.
Editable TrackItem (Trackable Items) columns can be configured in a manner similar to editable foreign key columns, ie., add the column and select the Mode. Trackitem columns are available if the SDC is Trackable. As with FK columns, the value of the TrackItem column is retrieved with the primary data, and an RSet is created for the TrackItem record.
Unlike FK columns, the Sample does not have to be associated with a TrackItem, and the field is always available to edit. After saving, a TrackItem record is created for the Sample if none exists. If the Sample already has a TrackItem record, it is updated.
![]() |
If multiple TrackItems are found for a single Sample SDI, the Maintenance page prevents editing of the TrackItem columns for that SDI. Hovering over the read-only TrackItem columns opens a tooltip stating that the SDI has multiple TrackItems and cannot be deleted. An RSet is not obtained for those TrackItems.
![]() |
Editable SDIAlias Columns |
This functionality is currently available (hardcoded) only for the Sample SDC.
Editable SDI Alias columns can be configured in a manner similar to editable foreign key columns, ie., add the column and select the Mode.
When selecting the column in the maint Element, existing Alias Types (defined by the AliasType Reference Type) are available in the column lookup. The format is sdialias.xxx, where xxx is the case-sensitive Alias Type.
![]() |
Because Alias Types are case-sensitive and can have spaces, the ColumnId for an Alias Type cannot itself have a column alias. For example, sdialias.Clinical "ClinicalColumn" would not be a valid ColumnId.
If no Alias Types are defined, you can manually enter sdialias.yyy (where yyy is the desired Alias Type) in the ColumnId field (i.e. an Alias Type is not required to be defined in the reftype).
![]() |
As with editable TrackItem columns, SDIAlias columns are editable at any time and do not require an SDIAlias for the SDI to be defined. The SDIAlias record is created the first time you specify an AliasId for the Alias Type. If the SDI Alias record already exists, it is updated. This mechanism lets you maintain multiple SDIAliasId's for multiple Alias Types on a single Maintenance page.
Dynamic Dropdowns |
"Dynamic Dropdowns" can be created to alter the contents of a dropdown (the "target column") based on the selection made in another dropdown (the "source column"). This functionality is currently available for the maint Element and sdclinkmaint Element.
To create a Dynamic Dropdown, the "Columns → Dropdown SQL" or "Columns → Dropdown Definition → Query Where" property for a target column is configured with the token '[columnid]', which is the column id of the source column. If both the "Dropdown SQL" and the "Dropdown Definition" are configured in this manner, the "Dropdown Definition" is used and "Dropdown SQL" is ignored. A target column can have one or more source columns, and a source column can have one or more dependent target columns.
In the following example, a custom Parameter List is created. The maint Element is configured with two columns in "dropdownlist" mode: an s_instrumenttype column (foreign key link to the LV_InstrumentType SDC) and an s_instrumentmodel column (foreign key link to the LV_InstrumentModel SDC). The goal is to choose an Instrument Type and have the Instrument Models change accordingly. This example uses the "Dropdown Definition → Query Where". Instrument Type is configured as the source column as shown below.
![]() |
Instrument Model is configured to be the target column as shown below. The "Dropdown Definition → Query Where" is instrumenttypeid = '[s_instrumenttype]', thus referencing the source column.
![]() |
Changing the Instrument Type then shows the Instrument Models of that type.
![]() |
If the current value of the dependent target column exists in the updated dropdown, the value will be preserved. Otherwise, the dependent target dropdown list will be blank.
When configured in a Maintenance Grid, changing the source column on the same row updates the dropdown of all dependent target columns.
Virtual Columns |
You can define editable "virtual columns" that are passed in with Action properties. A "virtual column" is a column that does not actually exist for the SDI, but can nevertheless be populated (by manual entry, JavaScript, or lookup) and passed to an Action as a property. Although the Action itself ignores the virtual columns, they can be passed on to SDC Rules.
To specify a virtual column, prefix the column name with an underscore (such as _mycolumn), and use it with a column mode other than the default. On save, the virtual column will be passed in with the Action and on to any SDC Rules.
In the example below, the Maintenance Form is configured to render a "Send Email" checkbox with a dropdown of recipients, and create custom properties that will be passed to the EditSDI Action when the Maintenance page is saved. This can be done by configuring two virtual columns as shown below.
![]() |
This renders the controls shown below.
![]() |
When the page is saved, the properties are passed into the EditSDI Action and any associated SDC Rules as shown below.
![]() |
This also works for foreign-key related columns, i.e., you can use the virtual column to pass values through to the foreign-key "save" Actions and their SDC Rules. For example, you can use "productid._mycolumn" with the Sample SDC, and when the EditSDI Action is executed on the Product SDC by the "save", it will pass the value as _mycolumn to the EditSDI Action.
Nested Selects |
You can create editable nested select columns, set the mode to any input type (including dropdownlist and lookup), and it will be rendered as an input. For backward-compatibility with previous LabVantage versions, the mode must not be empty or default. The Alias for the nested select uses an underscore prefix similar to Virtual Columns (such as _mycolumn). The underscore prefix flags the nested select as a Virtual Column that is passed to the executing Action and any SDC Rules.
For example, assume the maint Element for a Parameter List contains the following nested select for the Column Id:
(select max(pli.paramid) from paramlistitem pli where pli.paramlistid= paramlist.paramlistid and pli.paramlistversionid = paramlist.paramlistversionid and paramlist.variantid = pli.variantid) _maxParam
![]() |
The _maxParam is evaluated as "D".
![]() |
When the page is saved, _maxParam is passed into the EditSDI Action and any associated SDC Rules as shown below.
![]() |