Object: sapphire.page |
Description
API for page data.
File
WEB-CORE\scripts\sapphirecore.js
Properties
Property | Type | Description |
name | String | Name of the current page. |
data | Object | Client-side Property List of page data. This is populated only if jsdebug is enabled. |
disabled | Boolean | True if page is disabled. |
getSDCId |
Functionality
Returns the SDCId of the Maintenance, List, or DataEntry page.
Parameters
None.
Returns
String.
getKeyId1 |
Functionality
Gets the current keyid1 property (semicolon-delimited list) from any Core Page Type. If you are on a List page, this method calls getSelectedItemsInAllPages and gets the first item in the returned list. If you are on a Maintenance page, it returns the keyid1 value from the keyid1 field in the submitdata form. If you are on a Data Entry page, it uses the submitdata form (or find manually).
Parameters
None.
Returns
String.
getKeyId2 |
Functionality
Gets the current keyid2 property (semicolon-delimited list) from any Core Page Type. If you are on a List page, this method calls getSelectedItemsInAllPages and gets the first item in the returned list. If you are on a Maintenance page, it returns the keyid2 value from the keyid2 field in the submitdata form. If you are on a Data Entry page, it uses the submitdata form (or find manually).
Parameters
None.
Returns
String.
getKeyId3 |
Functionality
Gets the current keyid3 property (semicolon-delimited list) from any Core Page Type. If you are on a List page, this method calls getSelectedItemsInAllPages and gets the first item in the returned list. If you are on a Maintenance page, it returns the keyid3 value from the keyid3 field in the submitdata form. If you are on a Data Entry page, it uses the submitdata form (or find manually).
Parameters
None.
Returns
String.
navigate |
Functionality
• | Navigates to another URL from a LabVantage page. |
• | Uses a form to submit a POST to a URL. It is compatible with multiple browsers, can pass large amounts of information, and can use a target. |
• | This method supersedes the navigateTo method in layout.js. |
• | Beginning with R5.2 (DM0503), this method works with Unicode. Ninety percent of all LabVantage requests run through this method. |
Parameters
Parameter | Type | Description |
sUrl | String | URL of the page. |
sRleaseLockFlag | String | Setting this to Y releases the RSet locks when navigating. |
sTarget | String | Form/link target. |
oForm | Object | If you want to pass your own form object to submit to the URL, specify the object here. |
Returns
None.
getSelected |
Functionality
Gets the selected column values (specified in sColumn) in any List page, Maintenance page or Data Entry page. This method can also get the selected column values from detail elements on a Maintenance page by passing it the element id.
Parameters
Parameter | Type | Description |
sColumn | String | Selected column values. |
sElementId | String | Detail elements from which to get the selected column values. |
Returns
String.
maximizeLayout |
Functionality
Maximizes a page so the layout menu bar is hidden.
Parameters
None.
Returns
String.
minimizeLayout |
Functionality
Minimizes a page so the layout menu bar is visible.
Parameters
None.
Returns
String.
toggleLoading |
Functionality
Hides/shows the loading bar in the center of the screen.
Parameters
Parameter | Type | Description |
lShow | Boolean | True forces the bar to show (will not toggle). |
Returns
None.
getPageType |
Functionality
Returns the page type id for the current page. If no page type is found, returns an empty string.
Parameters
None.
Returns
String.
toggleDisable |
Functionality
Pass true to disable and false to enable. Will place modal cover over page rendering the page unusable.
Parameters
Parameter | Type | Description |
lDisable | Boolean | Set to true to disable the page and false to enable the page. |
Returns
None.
Object: sapphire.page.list |
Description
LabVantage API for List pages that are based on the MaintenanceList Page Type.
File
WEB-CORE\scripts\sapphirelist.js
Properties
None.
add |
Functionality
Opens the SDI Maintenance page for adding a new SDI.
Parameters
Parameter | Type | Description |
sAddPage | String | Page to open for adding the SDI. |
sAddTarget | String | Target for add navigation. |
oInitValidation | Function | Function to call before adding the SDI. |
lStoreSelection | Boolean | Set to true to preserve the selection when returning from the add page. |
Returns
None.
edit |
Functionality
Opens the SDI Maintenance page for editing an SDI.
Parameters
Parameter | Type | Description |
sEditPage | String | Page to open for editing the SDI. |
sEditTarget | String | Target for edit navigation. |
oInitValidation | Function | Function to call before editing the SDI. |
lStoreSelection | Boolean | Set to true to preserve the selection when returning from the edit page. |
Returns
None.
copy |
Functionality
Opens the copy popup that allows selected SDIs to be copied.
Parameters
Parameter | Type | Description |
sCopyPage | String | Page to open for editing SDIs after copying. |
sCopyTarget | String | Target for copy navigation. |
oInitValidation | Function | Function to call before copying the SDI. |
Returns
None.
view |
Functionality
Opens the SDI Maintenance page for viewing an SDI.
Parameters
Parameter | Type | Description |
sViewPage | String | Page to open for viewing SDIs. |
sViewTarget | String | Target for view navigation. |
oInitValidation | Function | Function to call before viewing the SDI. |
Returns
None.
remove |
Functionality
Deletes selected SDIs.
Parameters
Parameter | Type | Description |
oInitValidation | Function | Function to call before removing the SDIs. |
Returns
None.
report |
Functionality
Opens the Report page for reporting an SDI.
Parameters
Parameter | Type | Description |
sReportPage | String | Page to open for reporting SDIs. |
sReportTarget | String | Target for report navigation. |
oInitValidation | Function | Function to call before reporting the SDI. |
Returns
None.
getSelected |
Functionality
• | Wrapper for getSelected, getSelectedInAllPages, getSelectedColumnValue and getSelectedColumnValueInAllPages. |
• | Returns the selected values as a semicolon-delimited list. |
Parameters
Parameter | Type | Description |
sColumnIds | String | Semicolon-delimited list of column ids. If not specified, returns all columns that have the return flag set to Yes. |
lInAllPages | Boolean | Target for report navigation. |
oInitValidation | Function | If set to true, returns all selected values in all pages.
If set to false, returns the selected values on the current page. |
Returns
String.
refresh |
Functionality
Refreshes the List Element.
Parameters
Parameter | Type | Description |
sRsetList | String | Semicolon-delimited list of rset ids. |
Returns
None.
getIsSelected |
Functionality
Returns true if any items are selected, or false if no items are selected.
Parameters
None.
Returns
Boolean.
getSDCId |
Functionality
Returns the SDC Id of the List page.
Parameters
None.
Returns
String.
getKeyId1 |
Functionality
Returns the SDC KeyId1 of the List page.
Parameters
None.
Returns
String.
getQueryId |
Functionality
Returns the current QueryId of the List page.
Parameters
None.
Returns
String.
getKeyColumns |
Functionality
Returns a semicolon-delimited list of key columns for the SDC.
Parameters
None.
Returns
String.
getDescColumn |
Functionality
Returns the description column for the SDC.
Parameters
None.
Returns
String.
getColumnIds |
Functionality
Returns a semicolon-delimited list of columns on a List page.
Parameters
None.
Returns
String.
getReturnColumnIds |
Functionality
Returns a semicolon-delimited list of columns that have been flagged as return columns.
Parameters
None.
Returns
String.
getRowColumnIds |
Functionality
Returns a semicolon-delimited list of columns on the list page that are not return columns or key columns.
Parameters
None.
Returns
String.
SelectAll |
Functionality
Selects all items on a List page.
Parameters
None.
Returns
None.
clearSelection |
Functionality
Clears the selection on a List page.
Parameters
None.
Returns
None.
expandOrCollapse |
Functionality
Expands or collapses grouped bands.
Parameters
None.
Returns
None.
getSelectedKeyId1 |
Functionality
• | Gets the keyid1 list (separated by %3B) of the selected items across all pages. |
• | Works even if the keyid1 column is not a return column. |
• | Can be called from any frame, as long as a list_iframe is present on the page. |
Parameters
None.
Returns
String.
getSelectedKeyId2 |
Functionality
• | Gets the keyid2 list (separated by %3B) of the selected items across all pages. |
• | Works even if the keyid2 column is not a return column. |
• | Can be called from any frame, as long as a list_iframe is present on the page. |
Parameters
None.
Returns
String.
getSelectedKeyId3 |
Functionality
• | Gets the keyid3 list (separated by %3B) of the selected items across all pages. |
• | Works even if the keyid3 column is not a return column. |
• | Can be called from any frame, as long as a list_iframe is present on the page. |
Parameters
None.
Returns
String.
getSelectedKeyId1 |
Functionality
• | Gets the keyid1/keyid2/keyid3 list (depending of the iKey value) of the selected items across all pages. |
• | Works even if the keyid1/keyid2/keyid3 column is not a return column. |
• | Can be called from any frame, as long as a list_iframe is present on the page. |
Parameters
Parameter | Type | Description |
iKey | Integer | Specify 1 for keyid1, 2 for keyid2 or 3 for keyid3.
If not provided or another number is provided then will return all keys for selected items separated by ; and %3B. |
Returns
String.
selectAll |
Functionality
Selects all items on the page.
Parameters
None.
Returns
None.
clearSelection |
Functionality
Clears the selection on the page.
Parameters
None.
Returns
None.
expandOrCollapse |
Functionality
Expands or collapses groups on the page.
Parameters
None.
Returns
None.
hideColumn |
Functionality
Hides a column on the List page. The page iframe is refreshed after calling this function.
Parameters
Parameter | Type | Description |
sId | String | Identifier of the column. |
sColumnId | String | Name of the column. |
Returns
None.
showColumn |
Functionality
Shows a column on the List page. The page iframe is refreshed after calling this function.
Parameters
Parameter | Type | Description |
sId | String | Identifier of the column. |
sColumnId | String | Name of the column. |
Returns
None.
addColumn |
Functionality
Adds a column to the List page. The page iframe is refreshed after calling this function.
Parameters
Parameter | Type | Description |
sId | String | Identifier of the column. |
sColumnId | String | Name of the column. |
stitle | String | title for the column |
Returns
None.
showVersionStatus |
Functionality
Shows items with the specified version status. The page iframe is refreshed after calling this function.
Parameters
Parameter | Type | Description |
lCurrent | Boolean | A value of true shows Current items. |
lExpired | Boolean | A value of true shows Expired items. |
lProvisional | Boolean | A value of true shows Provisional items. |
lActive | Boolean | A value of true shows Active items. |
Returns
None.
getSelectedValue |
Functionality
Gets the value of any selected column on the List page (semicolon- and pipe-delimited). This method does not need the column to be set as returnable.
Parameters
Parameter | Type | Description |
vColumnIds | Variant | Can be a single column id or an array of column ids. |
sDefault | String | String to return if no value is found. |
Returns
String.
getSelectedValueArray |
Functionality
Gets the value of any column on the List page that is selected in an array collection (rows and columns). This method does not need the column to be set as returnable.
Parameters
Parameter | Type | Description |
vColumnIds | Variant | Can be a single column id or an array of column ids. |
sDefault | String | String to return if no value is found. |
Returns
2D String Array.
getValue |
Functionality
Gets the value of any column on the List page. This method does not need the column to be set as returnable.
Parameters
Parameter | Type | Description |
iPriRow | Integer | Primary row number for the item. |
sColumnId | String | Column id to get. |
sDefault | String | String to return if no value is found. |
sPrefix | String | Element/dataset prefix. Defaults to pr for primary. |
oSelectorEl | Object | Rather than using the primary row (iPriRow), you can also provide the checkbox element for that row. Either this or the primary row is required. |
Returns
String.
getValueItem |
Functionality
Used internally to get selected items. Finds the column value from the provided collections.
Parameters
Parameter | Type | Description |
saKeyCols | String Array | Key columns. |
saReturnCols | String Array | Return columns. |
saOtherCols | String Array | Other columns that are not keys or returns. |
sDescCol | String | Description column. |
saaKeyVals | String Array | 2D array of keycolumn values. |
saaReturnVals | String Array | 2D array of return values. |
saaOtherVals | String Array | 2D array of other values. |
sColumnId | String | Column id for which to obtain the value. |
sDefault | String | Default value to use if the column is not found or its value is null. |
Returns
String.
getColumnValue |
Functionality
Returns any value from any column on any row in a List page. The return is | delimited if more than one column.
Parameters
Parameter | Type | Description |
iRow | Integer | Row number from which to get the value (row as it appears on page). |
sColumnId | String | Semicolon-delimited list of columns to return (columns must be included in list page). |
sDefault | String | Default string to return if a column value is blank. |
Returns
String.
getColumnValues |
Functionality
Returns all values from every row for a single column on a List page. The return is %3B delimited if more than one row.
Parameters
Parameter | Type | Description |
sColumnId | String | Single column id to return (column must be included in list page) |
sDefault | String | Default string to return if a column value is blank. |
Returns
String.
Object: sapphire.page.list.util |
Description
Utility methods for List pages.
File
WEB-CORE\scripts\sapphirelist.js
Properties
None.
findInArray |
Functionality
Used internally to get an item in an array.
Parameters
Parameter | Type | Description |
saArray | String Array | String array. |
sValue | String | Value to find. |
lIgnoreCase | Boolean | Set to true to ignore case when searching. |
Returns
Integer.
rowsAndColumnsToString |
Functionality
Used internally to convert a 2D rows and columns array to a string that is semicolon- and pipe-delimited.
Parameters
Parameter | Type | Description |
saaArray | 2D String Array | String array. |
sRowDelim | String | Row delimiter (default is |). |
sColDelim | Boolean | Column delimiter (default is ;). |
Returns
String.
Object: sapphire.page.maint |
Description
LabVantage API for Maintenance pages that are based on the MaintenanceForm Page Type.
File
WEB-CORE\scripts\sapphiremaint.js
Properties
Property | Type | Description |
style | String | Stores the style of the maintenance element. |
add |
Functionality
Opens the SDI Maintenance page for adding a new SDI.
Parameters
Parameter | Type | Description |
sAddPage | String | Page to open for adding the SDI. |
sAddTarget | String | Target for add navigation. |
oInitValidation | Function | Function to call before adding the SDI. |
Returns
None.
report |
Functionality
Opens the Report page for reporting an SDI.
Parameters
Parameter | Type | Description |
sReportPage | String | Page to open for reporting the SDI. |
sReportTarget | String | Target for report navigation. |
oInitValidation | Function | Function to call before reporting the SDI. |
Returns
None.
preSave |
Functionality
Executes all pre-save validation scripts.
Parameters
None.
Returns
None.
save |
Functionality
Saves the current Maintenance page.
Parameters
None.
Returns
None.
saveAsTemplate |
Functionality
Saves the current Maintenance page as a Template.
Parameters
None.
Returns
None.
reset |
Functionality
Resets the current Maintenance page back to its loaded state.
Parameters
None.
Returns
None.
getSelected |
Functionality
Returns the selected key columns as a semicolon-delimited list.
Parameters
None.
Returns
String.
getSelectedKeyId1 |
Functionality
Returns the selected KeyId1 columns as a semicolon-delimited list.
Parameters
None.
Returns
String.
getSelectedKeyId2 |
Functionality
Returns the selected KeyId2 columns as a semicolon-delimited list.
Parameters
None.
Returns
String.
getSelectedKeyId3 |
Functionality
Returns the selected KeyId3 columns as a semicolon-delimited list.
Parameters
None.
Returns
String.
refresh |
Functionality
Refreshes the maint Element.
Parameters
None.
Returns
None.
getKeyId1 |
Functionality
Returns the KeyId1 of the Maintenance page.
Parameters
None.
Returns
String.
getKeyId2 |
Functionality
Returns the KeyId2 of the Maintenance page.
Parameters
None.
Returns
String.
getKeyId3 |
Functionality
Returns the KeyId3 of the Maintenance page.
Parameters
None.
Returns
String.
getSDCId |
Functionality
Returns the SDCId of the Maintenance page.
Parameters
None.
Returns
String.
getQueryId |
Functionality
Returns the current QueryId of the Maintenance page.
Parameters
None.
Returns
String.
getRSetId |
Functionality
Returns the RSetId of the Maintenance page.
Parameters
None.
Returns
String.
getIsSelected |
Functionality
Returns true if any items are selected, or false if no items are selected.
Parameters
None.
Returns
Boolean.
getSaveSuccessful |
Functionality
Returns true if a save was successful, or false if not.
Parameters
None.
Returns
Boolean.
getPostSaveSuccessful |
Functionality
Returns true if the post-save algorithms and Actions were successful, or false if not.
Parameters
None.
Returns
Boolean.
setFieldValue |
Functionality
Updates a field on the maint Element with the specified values.
Parameters
Parameter | Type | Description |
sFormName | String | Name of the form containing the field. |
sFieldName | String | Name of the field to update. |
sFieldValue | String | New value for the field. |
sColumnToExcludeIfBlank | String | Column to exclude if the value is blank. |
lSetOnModifiedRowOnly | Boolean | Set to true to update only modified rows.
Set to false to update the field even if it has not been modified. |
lEnableFlag | Boolean | Set to true to enable the field.
Set to or false to disable the field. |
Returns
None.
getFieldValue |
Functionality
Gets the column value for the specified column.
Parameters
Parameter | Type | Description |
sFieldName | String | Field name. |
sFormName | String | Form name (defaults to sdiedit). |
sDataSetName | String | Name of the result set (defaults to primary). |
sPrefix | String | Result set prefix (defaults to pr). |
iRow | Integer | Row number. |
oContainer | String | Container element (defaults to maint_iframe.document). |
Returns
String.
getSelectedColumnValue |
Functionality
Gets the column value for the selected items in a semicolon-delimited list.
Parameters
Parameter | Type | Description |
sColumnId | String | Identifier of the column. |
Returns
String.
getRowCount |
Functionality
Gets the row count (grid or form) that the maint element is displaying.
Parameters
Parameter | Type | Description |
sDataSetPrefix | String | Dataset id for the maint element. |
Returns
Integer.
getAllColumnValues |
Functionality
Gets the values for all specified columns.
Parameters
Parameter | Type | Description |
sColumnId | String | Delimited list of columns (or just one column) for which to obtain the values. |
sRowDelim | String | Delimiter to use for the rows. |
sColDelim | String | Delimiter to use for the columns. |
Returns
Returns a delimited list of row and column values.
getLocked |
Functionality
Returns true if the current element is locked because its SDIs are locked.
Parameters
None.
Returns
Boolean.
getLockedBy |
Functionality
Returns the identifier of the user who has the SDI locked.
Parameters
None.
Returns
String.
isGrid |
Functionality
Returns true if style is a grid.
Parameters
Parameter | Type | Description |
sElementId | String | The id of the maint element. |
Returns
Boolean.
Object: sapphire.page.request |
Description
API for viewing the request.
The sapphire.page.request object is most useful when dynamically rendering Elements (such as when using Ajax). Consider passing a parameter from a List page to a Maintenance page using client-side script. The sapphire.page.request object is a client-side representation of the request data, i.e., the pagetaginfo object. By default, every page has access to simple string-based properties that are in the pagetaginfo Property List, and its daughter pagedata Property List. For example:
• | Pass in KeyId1:
var sKeyId1 = sapphire.page.request.getParameter( 'keyid1' ); or var sKeyId1 = sapphire.page.request.data.keyid1 |
• | Get the page title:
var stitle = sapphire.page.request.data.pagedata.title; |
Where this becomes even more powerful is in implementations such as the Dashboard, where all the information about the Elements is rendered client-side (to dynamically update properties). In this case, you can pass either the "jsrequest" parameter through the request, or add the "jsrequest" property to the pagedata Property List with these values (use a semicolon-delimited list to include several areas, e.g., pagedata;layout):
• | element The request renders any additional Pproperty Lists from the Elements on the page, e.g., sapphire.page.request.data.maint.columns[0].id. This is used by the Dashboard to bring all data for the gizmos to the client. |
• | layout The request renders the layout property as well. |
• | pagedata The simple string pagedata object is replaced with a full representation of the pagedata Property List. |
• | full Renders everything in the pagetaginfo Property Llist into the request object. This is not used by default, as it renders a large volume of data. |
File
WEB-CORE\scripts\sapphirerequest.js
Properties
Property | Type | Description |
data | Object (Property List) |
A client-side representation of the LabVantage RequestContext
object. It is rendered as a client-side LabVantage property list using the
sapphire.util.propertyList class, and therefore has methods such as set/get.
By default, the property list renders the root of the request context (includes any request parameters) and the root of the pagedata. This can be altered by setting the page property "jsrequest" to either "element" (renders all element property lists), "layout" (renders the layout property list), "pagedata" (renders the full pagedata property list) and "full" (renders the full request context). Also the "jsrequest" property can be set to exclude properties using the "exclude=[propertyname]" syntax for example "exclude=FormLayout|FormProperties" will exclude both FormLayout property and FormProperties property from being rendered client side. |
getParameter |
Functionality
Gets a parameter from the request.
Parameters
Parameter | Type | Description |
sName | String | Name of the parameter. |
Returns
String.
Object: sapphire.page.dataEntry |
Description
LabVantage API for Data Entry pages based on the DataEntry Page Type.
File
WEB-CORE\scripts\sapphiredataentry.js
Properties
None.
getQuerySelectedKeys |
Functionality
When the SDIs are rendered using a Query, the rendered SDIs are not found in request. This method reads the hidden fields and returns the SDI column returned by the Query.
Parameters
Parameter | Type | Description |
sColumns | String | List of columns to return. |
Returns
String.
makeEntriesUnique |
Functionality
Removes duplicates from any values list.
Parameters
Parameter | Type | Description |
sValues | String | List of values. |
sDelimiter | String | Delimiter used in values list. |
Returns
String.
Object: sapphire.page.elements |
Description
LabVantage API for elements containted inside of a LabVantage page.
File
WEB-CORE\scripts\sapphireelements.js
Object: sapphire.page.elements.dataView |
Description
LabVantage API for the DataView element.
File
WEB-CORE\scripts\sapphireelements.js
Properties
None.
getSelected |
Functionality
Gets the selected values from the specified element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sColumns | String | Semicolon-delimited list of columns to return. Gets all columns by default. |
Returns
String.
getRowCount |
Functionality
Gets the number of rows in the specified element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
Returns
Integer.
filterRows |
Functionality
Filters rows in the element by the provided filter columns and filter values. This filter occurs client-side. Returns the new row count for the filter element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sColumnList | String | Semicolon-delimited list of columns on which to apply the filter. |
sValuesList | String | Semicolon-delimited list of values on which to apply the filter. |
Returns
Integer.
moveUp |
Functionality
Moves rows up in an element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sRows | String | Semicolon-delimited list of rows to move. |
Returns
None.
moveDown |
Functionality
Moves rows down in an element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sRows | String | Semicolon-delimited list of rows to move. |
Returns
None.
selectAll |
Functionality
Selects all rows in an element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
lSelect | Boolean | A value of true selects the rows. A value of false unselects the rows. |
Returns
None.
getKeyColumns |
Functionality
Gets the key columns for an element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
Returns
String.
getFieldValue |
Functionality
Pass element id string, column id string and row integer.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sColumnId | String | Column Id |
Returns
String.
Object: sapphire.page.elements.dataView.events |
Description
LabVantage API for controlling events on an element.
File
WEB-CORE\scripts\sapphireelements.js
Properties
None.
attachAddEvent |
Functionality
Attaches an event to the addition of new rows.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
attachRemoveEvent |
Functionality
Attaches an event to the removal of rows.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
attachUpEvent |
Functionality
Attaches an event to the movement of rows upward in the element.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
attachDownEvent |
Functionality
Attaches an event to the movement of rows downward in the element.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
attachResetEvent |
Functionality
Attaches an event to the reseting (clicking the rset button) of the element.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
Object: sapphire.page.elements.sdcLinkMaint |
Description
LabVantage API for the sdclinkmaint element.
File
WEB-CORE\scripts\sapphireelements.js
Properties
None.
getLinkType |
Functionality
Gets the link type for the specified element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
Returns
Integer.
getSelected |
Functionality
Gets the selected values from the specified element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sColumns | String | Sem-colon-delimeted list of columns to return. Gets all columns by default. |
Returns
String.
getRowCount |
Functionality
Gets the number of rows in the specified element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
Returns
Integer.
filterRows |
Functionality
Filters rows in the element by the provided filter columns and filter values. This filter occurs client-side. Returns the new row count for the filter element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sColumnList | String | Semicolon-delimeted list of columns on which to apply the filter. |
sValuesList | String | Semicolon-delimeted list of values on which to apply the filter. |
Returns
Integer.
moveUp |
Functionality
Moves rows upward in an element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sRows | String | Semicolon-delimeted list of rows to move. |
Returns
None.
moveDown |
Functionality
Moves rows downward in an element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
sRows | String | Semicolon-delimeted list of rows to move. |
Returns
None.
selectAll |
Functionality
Selects all rows in an element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
lSelect | Boolean | Set to true to select and false to unselect. |
Returns
None.
getKeyColumns |
Functionality
Returns the key columns for an element.
Parameters
Parameter | Type | Description |
sElementId | String | Identifier of the element. |
Returns
String.
Object: sapphire.page.elements.sdcLinkMaint.events |
Description
LabVantage API for controlling events on the element.
File
WEB-CORE\scripts\sapphireelements.js
Properties
None.
attachAddEvent |
Functionality
Attaches an event to the addition of new rows.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
attachRemoveEvent |
Functionality
Attaches an event to the removal of rows.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
attachUpEvent |
Functionality
Attaches an event to the movement of rows upward in the element.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
attachDownEvent |
Functionality
Attaches an event to the movement of rows downward in the element.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.
attachResetEvent |
Functionality
Attaches an event to the reseting (clicking the rset button) of the element.
Parameters
Parameter | Type | Description |
vFunction | Variant | JS script or function reference to execute on triggering of the event. |
lInsertBefore | Boolean | Set to true to insert the event at the beginning of the event list. The default is to add the event to the top of the event pile. |
iTimeout | Integer | If you specify a timeout in milliseconds, the event waits the specified time period before executing. |
Returns
None.