Home > Class Reference > ENSLIB namespace > %CSP.PageLookup

%CSP.PageLookup

class %CSP.PageLookup extends %CSP.Page

CSP page that provides a standard lookup for wizard-generated forms. It expects the following input:

CLASSNAMEName of class to perform lookup on.
OBJIDID of current instance.
SELECTA comma-delimited list of fields to display in the search result table. Each field is of the form 'property alias|desc' where alias and |desc are optional. If not specified, the WHERE list is used as the SELECT list.
WHEREA comma-delimited list of fields to search on. Each field is of the form 'property alias|desc' where alias and |desc are optional.
ORDERA comma-delimited list of fields used to sort the search results. Each field is of the form 'property |desc' where |desc is optional.
MAXROWSMaximum rows to display; if missing don't execute query.
TARGETURL of page to return to with results.
CAPTIONCaption for search window.
OPTIONSComma separated list of feature codes. These include popup, create, and clear.
OBJIDATTRThe name of the OBJID attribute for the associated form.

Note: For range operations the value in the WHERE parameter contains two values delimited by &.

Method Inventory (Including Private)

Parameters

parameter CANCELBTN = Cancel;
Caption for Cancel Button.
parameter CHARSET = utf-8;
Make default charset for the page UTF-8.
parameter CLEARBTN = Clear;
Caption for Clear Button.
parameter DEFAULTCAPTION = Caché Search;
Caption displayed if none specified (for normal mode).
parameter ENCODED = 1;
Override ENCODED from %CSP.Page
parameter FINDMSG1 = Find all instances of ;
First half of "Find all" message.
parameter FINDMSG2 = that meet the following conditions:;
Second half of "Find all" message.
parameter FOUNDMSG1;
First half of "Items Found" message.
parameter FOUNDMSG2 = matching item(s) found.;
Second half of "Items Found" message.
parameter NOCRITERIA = At least one search condition must be specified. Search not executed.;
Error message to display when no criteria are specified for a search and the search button is pressed.
parameter NOMATCH = No matching items found.;
No matching items message.
parameter PREDICATELIST = equals,not equal to,starts with,between,less than,greater than,contains,select;
List of values displayed in search predicate combo box.
parameter PRIVATE = 1;
Override PRIVATE from %CSP.Page
parameter SEARCHBTN = Search;
Caption for Search Button.
parameter SHOWNMSG1 = The first ;
First half of "Items Shown" message.
parameter SHOWNMSG2 = are displayed below:;
Second half of "Items Shown" message.

Methods (Including Private)

classmethod BuildSelectStatement(class As %String, proplist As %List, ByRef statement As %String, getcount As %Boolean = 0, idname As %String = "", select As %String = "SELECT", Output idfield As %Integer) as %Status
Constructs a SELECT statement for the property list proplist.
classmethod CreateResultSet(class As %String, restrict As %List, return As %List, orderby As %List, getcount As %Boolean, ByRef resultset As %ResultSet, ByRef rcount As %Integer, idname As %String = "", ByRef idfield As %Integer) as %Status
Constructs a query using the input values, opens a %ResultSet object using this query and returns it via resultset.

class
The name of the class to perform the lookup on.
restrict
A list of restrictions as $lb(property,value).
return
A $list of properties to return in the resultset.
orderby
A list of $lb(property,ASC|DESC) that specify the order of the result set.
getcount
If true, the query should fetch the number of rows in the result.
resultset
Returns a %ResultSet<