advancedsearch Element

 

Content

advancedsearch Element

Description

Options

Example

Properties

Description

The advancedsearch Element executes queries to populate a List page. This Element also organizes the presentation of retrieved SDIs.

Options

Properties provide the capability to search by:

Text string   Scanned identifier
SQL query   User-defined folders
Categories   •  Adhoc Queries

You can also write your own JavaScript function to accept values passed to it by the "Basic", "Query", and "Category" search options (set by the "Search Callback JavaScript" property), and the "GroupBy" option (set by the "GroupBy Callback JavaScript" property).

Example

Sidebar

 

 

1. Search retrieves SDIs by SDI Id.
   
2. Search by a Query retrieves SDIs by predefined SQL queries.
   
3. Barcode Scanning retrieves SDIs by scanned information.
   
4. Search By Category retrieves SDIs by Category.
   
5. Search by Folder lets you create user-specific Folders in which to store SDIs (see About Search by Folder below).
   
6. Adhoc Query is a special feature automatically integrated into the Search Bar (see Adhoc Queries).
   
Top Search
About Search by Folder...

This has two display styles: Toolbar (shown above) or Dropdown (displays options in a dropdown list).

When used with an SDI List Page:

Add adds selected SDIs to the chosen Folder. The quantity is displayed in parentheses.

...to a new Folder creates a new Folder when you click Add, then adds the selected SDIs to it.

Remove removes selected SDIs from the chosen Folder.
Clicking a Folder hyperlink loads the Folder's SDIs into the List Page.

The Toolbar style provides operational buttons (the Dropdown style offers these choices in the dropdown):

Button Function
plus Adds a new Folder.
circle Shows contents of the selected Folder (loads contents into the SDI List Page).
ellipsis Renames the selected Folder (prompts for the new name).
cross Deletes the selected Folder.
up-arrow Moves the selected Folder to the top of the Folder list.
down-arrow Moves the selected Folder to the bottom of the Folder List.

advancedsearch Element Properties

See the Example for a representative depiction of the advancedsearch Element within a List Page.

Property Name Description
SDC Identifier of the SDC for the SDIs retrieved by query.
Enable and Show Search Bar "Yes" (default) shows the Element in the List Page.
Show Search Bar Initially "Yes" (default) shows the Element the first time the List Page renders.
Search Types Specifies the search options to install on the Searchbar. Click Add Search Type to install one or more of the following:
Property NameDescription
IdentifierUnique identifier for this item, rendered as an ID attribute in the HTML tag.
Content NameSpecifies the search option: Groupby, Basic Search, Queries, Categories, Scan List, Folders, Adhoc Search, or Version Filter. Properties for the first 7 options are described below. See Version Filter for a description of that option.
titleText displayed above the option.
ShowDetermines whether or not to show this Search Type.
Initially ExpandedEach options can be expanded (to show it) or collapsed (to hide it). "Yes" expands the option when the page loads.
Maximum HeightMaximum height the area can expand before scrollbars appear.

A Search Type of "Version Filter" renders an additional panel in the Search Bar that lets users choose the specific Version Statuses to be listed in the List page. Access to this panel can be controlled by assigning Roles to the collection item.

The initial state of the checkboxes is derived from the default values defined for the Page Type. Subsequent visits to the page will persist settings made by the last user to access the page. If all checkboxes are unchecked, all statuses are displayed. This panel displays only Versioned SDCs.

Search Type Collapse/Expand "Yes" expands the Search Type to make it visible when the page loads.
Default Select Search Type that executes when an SDI List Page opens: Default Query, Default Category, First Folder, Last Search, or None.

Note the "Last Search" option. If you choose this, the advancedsearch Element remembers the last executed search. Upon returning to the List Page, the last executed search is repeated.

GroupBy Options The GroupBy Callback JavaScript property executes grouping of retrieved SDIs. The GroupBy Options determine when they are grouped:
Property NameDescription
Initially Grouped"Yes" groups SDIs when the page loads.
Basic Search Options Generates a basic search engine consisting of an input field accepting a search string:
Property NameDescription
Query Where SQL "where" clause with a set of square brackets as a variable that represents user input. Using the Sample SDC as an example, consider the following Query Where value:

sampledesc like '%[]%'

If the user enters a search string of butyl, the submitted query is:

sampledesc like '%butyl%'

This returns all Samples with a Sample Description containing the string butyl (such as butyl, bromobutyl, and chlorobutyl).

ShowDetermines whether or not to show the Search Options.
titletitle displayed on the Search Options.
PositionPosition of the Search Options.
Text SearchDetermines when text search is available: Never, Optional, or Always.
Dynamic Lookup Determines if a Dynamic Lookup is enabled on Basic Search input fields in Top Search Bar and (if one exists) Side Search Bar (see "Display Option" below).

Dynamic Lookup on a Basic Search includes texts in all KeyId columns and Description columns except the VersionId column. The suggestions will display all key columns including the VersionId and Description column but return only the KeyId1 column on selection and trigger searching. If you do not select from the suggestion list, you can click the search icon to trigger basic search with text in the field.

Page restrictive where clauses are observed when retrieving suggestions. For example, on the Sample Template List page, suggestions include only Sample Templates (not Samples).

The default is set to "Yes" on the Sapphire node to enable Dynamic Lookup in Basic Searches on all List and Lookup pages.

Display Option Determines where the Basic Search Options are placed within the Layout:
Property NameLocation
Top Search Bar
Side Search Bar
Both Top and Side
Search Bars
Query Search Options Generates a search engine consisting of a list of Query SDIs. Choosing one executes the query.

When constructing your Query SDIs, you can use either Collective or Cascaded Arguments. However, do not use the "Auto Quote Arguments" feature (it will corrupt the query).

The following properties configure this search engine:

Property NameDescription
style Determines how the Query SDIs are displayed for selection:
Property NameDisplays Query SDIs as...
HyperlinkHyperlinks (default). Cliking one executes the Query.
Dropdownlist Items in an HTML select list. Choosing an item executes the Query.
Query Category If you want to display only Query SDIs in a specific Category, choose the Category.
FilterIf you want to search using one or more Query SDIs, enter the Query SDI Ids, separating each with a semicolon.
Default Query Query SDI to execute when page loads.
Use Description"Yes" shows the query description rather than the query id
Use Query LabelShow the Query Label specified in the Query Maintenance page (if it exists). "No" is provided for backward-compatibility. 
ShowDetermines whether or not to show the Search Options.
titletitle displayed on the Search Options.
Use Query OrderBy If Provided"Yes" overrides the default page sort order by using the sort order specified in the Query.
Display OptionDetermines where the Query Search Options are placed within the Layout:
Property NameLocation
Top Search Bar
Side Search Bar
Both Top and Side
Search Bars
Top Search Option Determines how to show Queries in the Top Search Bar:
Property NameLocation
Show Query List
Show Default Query Only If the Query has arguments, the arguments are shown:

If the Query has no arguments, only the "Default Query" is shown:

Category Search Options Generates a search engine consisting of a list of Categories (clicking one shows all SDIs in that Category):
Property NameDescription
styleDetermines how the Categories are displayed for selection:
Property NameDisplays Query SDIs as...
HyperlinkHyperlinks (default). Cliking one executes the Query.
Dropdownlist Items in an HTML select list. Choosing an item executes the Query.
FilterIf you want to search using one or more Category SDIs, enter the Category SDI Ids, separating each with a semicolon.
Default CategoryAll SDIs in this Category are shown when the page loads.
Scan in Ids Properties for the bar code scan input box inside the search bar are:
Property NameDescription
Match ColumnSpecify a column identifier in the SDC (specified by the SDC property), and the column identifier will be matched with the text entered into the Scan input field of this Element. If you do not specify a value here, it will default to the KeyId1 column.
Show Add Button"Yes" (default) shows the Add button (equivalent to the "Enter" key), which adds all scanned identifiers to the list.
Show Clear Button"Yes" (default) shows the Clear button (equivalent to the "Enter" key), which removes all scanned identifiers from the list.
Preserve Scan Order"Yes" overrides the page sort order by using the scanner sort order.
NOTE: In general, KeyId1 and alternate columns of the primary can be scanned in SDI List pages. When scanning in the SDIWorkitem List and Dataset List pages, you can scan on the alternate column KeyId1, which (for these pages) is actually the Sample Id. However, scanning on alternate columns of the Sample table is not possible in the SDIWorkitemList and Dataset List pages.

Note that when scanning in the Sample List page, the scan typically returns a single row. When scanning in the SDIWorkitem List and Dataset List pages, multiple Data Sets (or Tests) are typically returned and presented in order of the UserSequence.

Folder Search Folder Search options:
Property NameDescription
Operations styleChoices: toolbar or dropdown.
New Folder FormatFormat for new folder, based on Java SimpleDateFormat options. The default is MMM dd HH:mm.

For more information, see About Search by Folder above.

Adhoc Search AdHoc Query page to use for an Adhoc search:
Property NameDescription
AdhocQuery PageChoices: AdhocQueryPopup (default), AdhocQuery, AdHocSample1, AdhocQBioBanking, and AdhocQTraditional.
Filter Where ClauseQuery where clause to restrict the list of Adhoc Queries shown in the advancedsearch Element.
GroupBy Callback JavaScript A JavaScript function executes the GroupBy search option. We supply a default function. If you want to use it, leave this property blank.

As with the Search Callback JavaScript property below, you can use the GroupBy Callback JavaScript property to specify your own function that will execute the grouping. Your function will then use the parameters passed to it by the Group By property.

The default function is groupBy, which uses a fixed list of parameters.

If you want to use your own function, enter only the function name (such as groupBy).

Search Callback JavaScript A single JavaScript function executes the "Basic", "Query", and "Category" search options above. We supply a default function. If you want to use it, leave this property blank.

Alternatively, you can use this property to specify your own JavaScript function that will execute the searches. Your function will then use the parameters passed to it by the relevant search engine (Basic, Query, or Category).

The default function is:

showResult( searchtype, searchid, sdcid, queryfrom, querywhere, argarray )

This function is located in WEB-CORE/pagetypes/list/list.jsp, and called by the search JSP rendered in the browser.

If you want to use your own function, enter only the function name (such as showResult). To assist in writing your function, use showResult() as an example. Note the parameter values passed to it by each search engine (see the function for explicit guidance):

ParameterDescription of Value
searchtypeSearch option being executed.
searchidIdentifier of the Query SDI (if a Query SDI executes the Query).
sdcidSDC for the SDI(s) retrieved by the search.
queryfromTable(s) queried by the search.
querywhereWhere clause (if any).
argarrayArray position of the parameter (if you need to find it by array number).

Make certain your function is in list.jsp or the file you specify using the Include property of the List Page Type.

Width Width of the Element in pixels. If you do not specify a value, the Element will be as wide as its content.
Height Height of the Element in pixels. If you do not specify a value, the Element will be as high as its content.
Left Distance between the left edge of the Element and the left edge of the screen.
Top Distance between the top edge of the Element and the top of the screen.
Reference Element for Search Bar Position The height and top edge of the AdvancesSearch Element will be aligned with the identifier (ID attribute) of the HTML element you specify here. The default is contentdiv.
Search Bar Container HTML Element The identifier (ID attribute) of the HTML element you specify here will enclose the advancedsearch Element. The default is searchtd.