Object: sapphire.lookup |
Description
LabVantage API for managing lookup pages and lookup dialogs.
File
WEB-CORE\scripts\sapphirelookup.js
Properties
Property | Type | Description |
blankUrl | Object | Stores the blank URL String. |
open |
Functionality
Opens a popup window or LabVantage dialog.
Parameters
Parameter | Type | Description |
sName | String | Name for the window. |
sUrl | String | URL for the window. |
sFeatures | String | Directly matches onto the window.open method from the native API, where you can define the window characteristics (such as height and width). |
lReplace | String | This has been deprecated and is no longer used. It was formerly used to replace the currently open window with the newly defined window. |
lSapphire | Boolean | Set to true to show in LabVantage dialog, or false to show in popup window. |
Returns
None.
Object: sapphire.lookup.reftype |
Description
Handles reftype lookup.
File
WEB-CORE\scripts\sapphirelookup.js
Properties
None.
open |
Functionality
Pass field id string (to return into), reftype id string and true if to use a sapphire dialog.
Parameters
Parameter | Type | Description |
sFieldId | String | Identifier of the field in which to return the value. |
sRefTypeId | String | The reftype Id for the lookup. |
IUseSapphireDialog | Boolean | Set to true to show in sapphire dialog. |
Returns
None.
Object: sapphire.lookup.date |
Description
LabVantage API for showing date lookup.
File
WEB-CORE\scripts\sapphirelookup.js
Properties
Property | Type | Description |
newlookup | Object | Contains a pointer to the lookup dialog. This is null if the dialog is not present. |
open |
Functionality
Opens the date/calendar lookup.
Parameters
Parameter | Type | Description |
sFieldId | String | Identifier of the field in which to return the value. This is required if you do not provide a notify method or column details. |
sNotifyMethod | String | JS method to execute on date selection. |
sDSName | String | DataSet of caller element. Required only if not supplying field id or notify method. |
sIndex | String | Row number or index of calling field. Required only if not supplying field id or notify method. |
sColumnId | String | Column id of calling field. Required only if not supplying field id or notify method. |
sFormat | String | Date format. Defaults to system default. |
lSapphire | Boolean | Set to true to show in LabVantage dialog, or false to show in popup window. |
Returns
None.
Object: sapphire.lookup.sdi |
Description
LabVantage API for looking up SDIs.
File
WEB-CORE\scripts\sapphirelookup.js
Properties
None.
openSimple |
Functionality
Opens the SDI lookup defaulting everything.
Parameters
Parameter | Type | Description |
sFieldId | String | Identifier of the field in which to return the value. |
sSDCId | String | SDC Id for the lookup. |
Returns
None.
openPage |
Functionality
Opens the SDI lookup using the lookup list page you provide.
Parameters
Parameter | Type | Description |
sFieldId | String | Identifier of the field in which to return the value. |
sSDCId | String | SDC Id for the lookup. |
sPageId | String | Lookup page id or URL. |
sMapColumnId | String | Identifier of the column into which the returned column is mapped. |
lUseSapphireDialog | Boolean | Set to true to show in LabVantage dialog, or false to show in popup window. |
oPageDirectives | Property List Object | This is a LabVantage property list representing page overrides to be merged with the list page. For example, setting the property "title" in the directives will override the default list page title. |
Returns
None.
openDefault |
Functionality
Opens the SDI lookup in its default mode.
Parameters
Parameter | Type | Description |
sFieldId | String | Identifier of the field in which to return the value. |
sSDCId | String | SDC Id for the lookup. |
sMultiselect | String | Set to Y to place the lookup in multiselect mode. |
sNotifyMethod | String | JS to execute when the lookup returns. |
lUseSapphireDialog | Boolean | Set to true to show in LabVantage dialog, or false to show in popup window. |
Returns
None.
open |
Functionality
Opens the SDI lookup. This method is called from maintenance columns that are of lookup type.
Parameters
Parameter | Type | Description |
sFieldId | String | Identifier of the field in which to return the value. |
sSDCId | String | SDC Id for the lookup. |
sColumns | String | Semicolon delimited list of columns to show. |
sMultiselect | String | Set to Y to place the lookup in multiselect mode. |
sNotifyMethod | String | JS to execute when the lookup returns. |
sKeyId1 | String | Key Id 1 value. |
sKeyId | String | Key Id 2 value. |
sKeyId3 | String | Key Id 3 value. |
sDSName | String | Dataset name. |
sIndex | String | Row number or index. |
sColumnId | String | Identifier of the calling column. |
sPageId | String | Lookup page id or URL. |
sMapColumnId | String | Column id into which returned column is mapped. |
lUseSapphireDialog | Boolean | Set to true to show in LabVantage dialog, or false to show in popup window. |
oPageDirectives | Property List Object | This is a LabVantage property list representing page overrides to be merged with the list page. For example, setting the property "title" in the directives will override the default list page title. |
Returns
None.
Object: sapphire.lookup.fileSystem |
Description
LabVantage API for showing server file dialog.
File
WEB-CORE\scripts\sapphirelookup.js
Properties
Property | Type | Description |
fileLookup | Object | Contains a pointer to the lookup dialog. This is null if the dialog is not present. |
browseFile |
Functionality
Opens the file system (defaulting many of the properties) and browses for a file on the server.
Parameters
Parameter | Type | Description |
vElement | Variant | Field id or field element in which to return the value. |
vFileType | Variant | Single file type string, or an array of file extensions. |
sBaseDir | String | Starting directory (defaults to sapphirehome). |
sFileLocationType | String | Identifier for the file locations defined in the system. This will populate the available shortcuts down the side. |
Returns
None.
browseWeb |
Functionality
Opens the file system (defaulting many of the properties) and browses for a Web-based file on the server.
Parameters
Parameter | Type | Description |
vElement | Variant | Field id or field element in which to return the value. |
vFileType | Variant | Single file type string, or an array of file extensions. |
sBaseDir | String | Starting directory (defaults to sapphirehome). |
sFileLocationType | String | Identifier for the file locations defined in the system. This will populate the available shortcuts down the side. |
Returns
None.
browseZip |
Functionality
Opens the file system (defaulting many of the properties) and browses for a file on the server. This allows browsing inside of ZIP/WAR/JAR/EAR files.
Parameters
Parameter | Type | Description |
vElement | Variant | Field id or field element in which to return the value. |
vFileType | Variant | Single file type string, or an array of file extensions. |
sBaseDir | String | Starting directory (defaults to sapphirehome). |
sFileLocationType | String | Identifier for the file locations defined in the system. This will populate the available shortcuts down the side. |
Returns
None.
browseFolder |
Functionality
Opens the file system (defaulting many of the properties) and browses for a folder on the server.
Parameters
Parameter | Type | Description |
vElement | Variant | Field id or field element in which to return the value. |
vFileType | Variant | Single file type string, or an array of file extensions. |
sBaseDir | String | Starting directory (defaults to sapphirehome). |
sFileLocationType | String | Identifier for the file locations defined in the system. This will populate the available shortcuts down the side. |
Returns
None.
create |
Functionality
Main method that others call to create and show the file dialog.
Parameters
Parameter | Type | Description |
vElement | Variant | Field id or field element in which to return the value. |
vFileType | Variant | Single file type string, or an array of file extensions. |
sBaseDir | String | Starting directory (defaults to sapphirehome). |
lRelative | Boolean | Set to true to return the path in a relative position to the base/starting directory. |
lForceSub | Boolean | Set to true to force the user to navigate to a subdirectory before a selection can be made. |
sFileLocationType | String | Identifier for the file locations defined in the system. This will populate the available shortcuts down the side. |
lWebFile | Boolean | Set to true if browsing for a Web-based file. |
lFoldersOnly | Boolean | Set to true if browsing for a folder. |
lDirLock | Boolean | Set to true to lock the navigation of the directories and force the user to select a file from the opening directory. |
lUseZip | Boolean | Set to true to allow browsing inside of ZIP/JAR/WAR/EAR files. |
vShortCuts | Variant | String of sem colon-delimited shortcuts, or an array of shortcuts for down the left side. |
sActiveExtension | Boolean | Extension to make active on open. |
lValidateFiles | Boolean | Set to false to stop validation of files on selection (validation checks if the file exists). |
sFunctionText | String | Text for the function (such as Open or Save). |
stitleText | String | Text for the dialog title. |
sButtonText | String | Text for the selection button (such as Select or Open). |
Returns
None.
Object: sapphire.lookup.util |
Description
LabVantage API for lookup utility methods.
File
WEB-CORE\scripts\sapphirelookup.js
Properties
Property | Type | Description |
debug | Boolean | Set to true if, for debugging purposes, you do not want to open a dialog. In this case, you will navigate the current window to the lookup. |
lookupWindow | Object | Pointer to the window object of the dialog. |
lookupDialog | Object | Pointer to the LabVantage dialog object of the dialog. |
getCoord |
Functionality
Gets the left and top (x and y) coordinates for a dialog centered on the screen, based on its width and height.
Parameters
Parameter | Type | Description |
iWidth | Integer | Width of the dialog. |
iHeight | Integer | Height of the dialog. |
Returns
Integer Array.
openWindow |
Functionality
Opens a popup window or LabVantage dialog in the center of the screen.
Parameters
Parameter | Type | Description |
sName | String | Name for the window. |
stitle | String | title for the window. |
sUrl | String | URL for the window. |
iWidth | Integer | Width of the window. |
iHeight | Integer | Height of the window. |
lSapphire | Boolean | Set to true to open a LabVantage dialog rather than a popup window. Remember that your dialog page must be LabVantage-dialog-aware. |
oPropertyList | Property List Object | Property list of values to submit to the lookup page. These are converted into a form. |
lMax | Boolean | Set to true to open the dialog maximized. |
Returns
None.