gwtdataentrygrid Element |
|
Content |
|
|
Description |
The gwtdataentrygrid Element uses GWT technology to render the grid on Data Entry pages. These OOB pages use the gwtdataentrygrid Element:
• | Inner pages hosted by the DataEntry Page Type and DataEntryByQuery Page Type (see Data Entry Pages for descriptions). |
• | Approval pages (see Approve Tests). |
Example |
See Data Entry Pages for descriptions of page functionality.
gwtdataentrygrid Element Properties |
Property Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SDC | Identifier of the SDC for which data are entered. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Entry Field Width | Width of the data entry input field in pixels (defaults to 100). Set to zero to hide the field. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Entry Field Column Id | To edit any column in SDIDataItem or SDIData other than the data entry
column, specify the ColumnId here.
This is used to configure the AnalystAssignment (gDEGridAssignAnalyst) and InstrumentAssignment (gDEGridAssignInst) inside pages for Data Entry. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data Item Display Rule | Executes server-side filtering to determine how data are displayed. You
can choose a predefined rule or define one using a Groovy expression.
Predefined Rules
Example of Groovy Expression Also see Using the Availability Flag below.
Supported objects:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Max Data Item Limit | Maximum number of Data Items allowed to render to the client. when this limit is reached, the item count message will be displayed in red. This does not prevent an open-ended query from retrieving large Data Sets from the database (server). A reasonable number can be 5000. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Show Approval | Determines whether or not Data Set Approval can be conducted (defaults
to No).
When set to Yes, all Data Set key columns (Keyid1, ParamListIid, ParamListVersionId, VariantId, Dataset) must be configured in the Row header column collection. Note that SDCId is excluded, and KeyId2/KeyId3 are excluded only if they are null. This supports all features of Approval Types. Data Set Approval changes are persisted by calling EditDataApproval Action. The Action call triggers a reevaluation of overall Data Set status by calling GetApprovalFlag. The result is persisted to SDIData.ApprovalFlag, which indicates the current overall Approval status by evaluating the Approval Rules. Note that prior to LabVantage R5.1 (DM0502), LabVantage evaluated overall approvalstatus of the Data Set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data Set Status Alert Rule | When Show Approval is set to Yes, allow a
Groovy expression to mark the Data Sets to be alerted by placing an alert
icon next to the Data Set Number. The expression should return either an
empty string or an alert message. The message will be shown as a tip when
you mouseover the alert icon.
In this example, the alert icon is shown when a message returns: sdidataitemdataset.findRow( "hasaudittedchanges=1" )>=0 ? "Has Auditted Changes, " : "") + (sdidataitemdataset.findRow( "speccondition=Fail" )>=0 ? "Has Specifications which Fail, " : "") + (sdidataitemdataset.findRow( "s_acoverriddenflag=Y" ) >=0 ? "Analyst has Overriden Certification, " : "") + (sdidata. S_ICOVERRIDDENFLAG=="Y" ? "Used Instrument with Overriden Certification" : "") |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Refesh Page After Saving | Determines whether or not to refresh the page after saving. Set to Yes
only if:
Custom Post-Data Entry SDC Rules are adding additional Data Sets/Data Items... or... You are modifying any column value in the Row header or Column header that must be immediately reflected. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Live Limit Check | Determines whether or not to delay the request for a Spec Limit Condition
check as the user is entering data. This property overrides the same property in the DataEntryPolicy. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Initial Show Detail | Determines whether to show or hide the detail panel on initial load. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Initial Detail Height | Height of the detail panel in pixels on initial load. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Default Detail Tab | Default detail tab to show on initial load. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Read Only | Determines whether or not the entire Data Entry iframe page (both the Data entry grid and the Detail panel) is readonly. For dynamic setting, this supports the Request Parameter parameter readonly, i.e., readonly=Y or readonly=N. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Auto Popup Instrument Connection | Determines whether or not to automatically open the Instrument Connection window onFocus of a parameter field that is mapped to an InstrumentFieldId. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Options After Instrument Fill | Determines where cell focus is trnaferred after data are automatically entered form an Instrument. "Stay" maintains focus in the current cell, "Move Right" and "Move Down" change focus to the right or downward. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Error Status Option | Determines the operations allowed on a Data Item when the Data Item has
an error status of Value_Rejected:
This is useful when handling Absurd Limits defined in Limit Rules. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Save Validation Options | Determines whether to allow "Save" or "Save and Release"
when one or more Mandatory Data Items has not been entered:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Visual Policies to Apply | Lets you choose a subset of Data
Entry Policies to apply (defaults to all Policies). If the same visual
cues are used for multiple attributes, the first match applies.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Column header | Collection of columns to be used as crosstab column headers.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Maintain KeyId1 Order | "Yes" sorts the grid header in the order of the KeyId1 list
that is passed in from request parameters. This is honored if KeyId1 is
the first column in either the column header or row header collection.
"No" sorts the grid header in the order retrieved by the query. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Row header | Collection of columns to be used as crosstab row headers. This must specify
a particular set of key column if Data Set Approval is enabled (see Show
Approval).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Columns | Specifies attributes of the Data Item columns. This supports the syntax primary.columnid and sdidata.columnid, as well as nested selects. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Toolbars | Specifies attributes of the Toolbar.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Details | Specifies attributes of the Detail Panel.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Synchronize AQC status | Determines whether or not to synchronize AQC status after saving data (defaults to Yes). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Synchronize Primary Status | Determines whetheror not to synchronize the status of the primary SDI after saving data (defaults to Yes). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Primary Status Column | Identifier of the column that represents the status of the primary SDI. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Secondary SDC | This allows configuration of a secondary SDC's data to be displayed together
with a primary SDC's data in read-only mode. This is useful if summary aggregate
information must be displayed in the Data Entry page, as summary information
is typically in a parent SDI that is related to the SDI with Data Sets that
are shown in the Data Entry page.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Allow Delete Column | "Yes" allows a User to delete (and restore) a column in the Data Entry grid. Clicking a column header displays a delete icon (x). Clicking the icon deletes the column from the grid. Clicking "Refresh" will re-render all deleted columns. See Data Entry Pages → Column and Row Removal. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Allow Delete Row | "Yes" allows a User to delete (and restore) a row in the Data Entry grid. Clicking a row header displays a delete icon (x). Clicking the icon deletes the row from the grid. Clicking "Refresh" will re-render all deleted rows. See Data Entry Pages → Column and Row Removal. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Grid Top Filter | Configures a client-side filter based on the data retrieved and placed
on the top of the Data Entry grid.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Grid Top Spec Display HTML | This lets you customize the display of a Specification that is passed
into the Data Entry page using the Request Controller command-parameter
syntax shown in the following example:
rc?command=page&page=DataEntry&keyid1=S-180509-00007&specid=Spec-001&specversionid=1 The Spec Condition resulting from the evaluation of the passed-in Specification is displayed according to the Spec Condition's visual cue, and the "Spec Condition Display Option" in the Data Entry Policy is ignored. The Specification is displayed above the Data Entry grid to indicate that the visual Spec Condition is for the specific passed-in Specification.
The "Grid Top Spec Display HTML" property lets you configure the header of the passed-in Specification. This allows the tokens replacements [specid], [specversionid], and all other Specification primary columns. For example: <span style="background-color:green">Show Spec Condition for [specid] ([specdesc])</span> Note that only the passed-in Specification is shown in the grid and detail.
|
Rule for Column and Row headers |
When configuring the Column header and Row header properties, keep in mind that each cell actually defines a combination of a Row header, Column header, and cell. Also, each cell must reference a single Data Item. Therefore, the combination of any Row header and Column header value must resolve to a single Data Item. An error is generated if this is not the case.
header Sorting and Grouping |
header columns are sorted in the order defined by the relevant property, with the exception of Parameter Lists and Parameters:
• | Parameter Lists are sorted by UserSequence (SDIData.UserSequence), with ParamListId first. |
• | Parameters are sorted by UserSequence (SDIDataItem.UserSequence), with ParamId first. |
JavaScript API |
The gwtdataentrygrid Element provides the JavaScript functions listed below. Most are self-explanatory (except where noted).
JS API for the outer Data Entry page: | ||||||||||||||||||
|
||||||||||||||||||
JS API for the iframe: | ||||||||||||||||||
|
||||||||||||||||||
JS API for the grid: | ||||||||||||||||||
|
||||||||||||||||||
|
There is also a Translation API for Data Entry pages (see Translation below).
Translation |
These APIs are available specifically for translation:
• | JavaScript function sapphire.translate( textid ) in sapphirecore.js. This can be called from Data Entry pages. The Translation table is dynamically generated to the client for the User language, with the cache-control set to 30 days. |
• | The translate( textid, tokenValueMap) method in sapphire.accessor.TranslationProcessor lets you translate phrases with dynamic tokens. |
The AutoFillTransmasterTemp table is supported with client-side translation. A beforeunload event fires an Ajax call to save the untranslated textids (if any have been collected), and the Auto fill temporary translation table property in the System Configuration is set to "Yes".
Client-side and server-side translation are unified under the existing LabVantage translation framework. A translation JavaScript file is automatically generated and downloaded for each language.
Using the Availability Flag |
The SDIData.AvailabilityFlag has always been in LabVantage to indicate when the Data Set is available for Data Entry. The AddDataSet Action defaults AvailabilityFlag to Y.
The gwtdataentrygrid Element new Grid configuration uses the Data Item Display Rule to drive from the AvailablityFlag (as shown in the Groovy example for the Data Item Display Rule).
Recall that LabVantage "Preparation" and "Procedural" Parameter Lists. Typically, Workitems would include one of each of these types. The idea is to force Data Entry on "Preparation" before entering data for "Procedural". AvailabilityFlag is set to Y when the Workitem contains one of these:
• | Only Procedural Parameter Lists. |
• | Only Preparation Parameter Lists. |
• | Only untyped Parameter Lists. |
However, when the Workitem has both "Preparation" and "Procedural" Parameter Lists:
• | For Preparation Parameter Lists, AvailabilityFlag is set to Y. |
• | For Procedural Parameter Lists, AvailabilityFlag is set to N. |
• | After data are Released for the Preparation Parameter List, AvailabilityFlag is set to Y for the corresponding Procedural Parameter List for this Workitem. |
The ApplySDIWorkitem Action sets the AvailabilityFlag when calling the AddDataSet Action.
About Page Refresh |
When saving without refreshing OOB, the gwtdataentrygrid Element calls 4 post-save Actions in the same database transaction. Therefore, any dataset or primary record status change as a result of these 4 Actions will work with Data Entry pages.
By default, Data Entry pages hosting the gwtdataentrygrid Element do not refresh the grid after saving. You should expect any values updated by post-save Actions (such as setting Data Set status) to be updated on the UI without refreshing the entire page if those values are configured as readonly or image icons in the additional columns in the grid cell. However, if those values are part of the Row headers or Column headers, they will not be updated without refreshing the page after saving. In the latter case, it is strongly recommended that the page configuration set the Refresh Page After Saving property to Yes to reflect the changes after saving.
About "Non-Numeric Tags" |
During Data Entry, some configurations may require entering/returning text that either describes numeric data or explains why it could not be entered. Such text is referred to as a "non-numeric tag" (or "NNT"). For example, assume that a value <5 is considered to be BDL (below detection limit). If the numeric data value is 4, you may want to make BDL a non-numeric tag in order to enter BDL rather than 4 or enter 4 and return BDL. See Using Non-Numeric Tags for an example of this.
ESig JavaScript API |
When configuring advancedtoolbar - Electronic Signature - ESig Required, the "Custom" option provides a mechanism to dynamically change ESig behavior for buttons based on User activity before a button is clicked. For example, to enable ESig on the "Save" button when Sample description changes on an SDI Maintenance page, an "onchange" event could be set to trigger +parent.enableEsigRequired( 'Save' );
These methods to support ESig-related functionality are available on pages that use the gwtdataentrygrid Element:
Property Name | Description |
getUpdatesMade() | Returns true if any enteredtext changes from an existing saved non-empty value. In combination with the ESig JavaScript API described in the advancedtoolbar Element, this API allows configuration to trigger ESig only when editing existing Data Item values. |
getUnreleasesMade() | Returns true if any Data Item has its releasedflag changed from Y to N. |
getReleasesMade() | Returns true if any Data Item has its releasedflag changed from N to Y. It does not cover releasedflag change from N to Y when clicking "Save and Release", as the Release part of the Save is completed server-side as part of the Data Entry process. |
For example, you can write a custom button validation function for Data Entry as:
function checkEsigRequired( buttonid ) {
if ( rightframe.getUpdatesMade() || rightframe.getUnreleasesMade() ) {
if ( buttonid == 'Save' ) {
enableEsigReasonOnly( 'Save' );
}
else if ( buttonid == 'SaveandRelease' ) {
enableEsigRequired( 'SaveandRelease' );
}
}
return true
}