Description
The IndexLookup function is used by the "Index lookup" QuickEvent. It allows the user to supply criteria for specified indexed columns, then builds a list of rows that match those criteria, and finally allows the user to select desired rows out of the resultant popup.
Syntax
keys = IndexLookup (ownerwindow, table, indexedfields, displayedfields, mode, popupname)
Parameters
The IndexLookup function has the following parameters:
Parameter | Description |
---|---|
Ownerwindow | Contains the name of the window from which to display the Lookup dialog. |
Table | The name of the indexed OpenInsight table to search. |
Indexedfields | An @vm-delimited list of indexed columns in table which the user can supply search criteria for. Note: The upper limit to the number of columns allowable in the Indexed fields parameter is twenty four(24). |
Displayedfields | An @vm-delimited list of columns in table which will be displayed to the user in the resultant Popup. |
Mode | Either "SINGLE" or "MULTI", specifying whether multiple selections can be made from the resultant Popup. (Optional, defaults to "MULTI".) |
Popupname | By default, the IndexLookup function creates a Popup which displays the columns specified by displayedfields. You can override the default Popup by passing the name of the Popup to use. When using an existing popup, the columns defined within the Displayedfields parameter are ignored.(Optional, defaults to null.) |
Returns
An @vm-delimited list of keys corresponding to the rows selected in the Popup.
See also
BTree.Extract, Collect.IXVals(), Create_Index, List_Index, Popup()
Example
declare function IndexLookup ownerwindow = @window table = "BOOKS" indexedfields = "TITLE" displayedFields = "BOOK_ID":@vm:"TITLE":@vm:"AUTHOR" mode = "SINGLE" popupName = "" key = IndexLookup(ownerwindow, table, indexedfields, |displayedfields, mode, popupname) Set_Property(keyField,"DEFPROP",key)