The lookup() command displays a general purpose screen to display, search and retrieve a database table. This is used for finding products, customers, accounts, sales and any other concepts. Some of these areas may have specialised search screens, but lookup can also be used.
lookup(DatabaseTableName, KeyName, Arguments )
lookup(psql(ZZZ), KeyName, Arguments )
lookup(gnap(ZZZ), KeyName, Arguments )
lookup(mesh(ZZZ), KeyName, Arguments )
Sets the title of the Window to NN. The default value of the title is typically only the underlying table name.
Set an automatic refresh interval at which the list contents will automatically by reloaded from the database. This feature is primarily designed for monitoring screens and can be difficult to work with if implemented at a short refresh interval.
Specifies a single field as a primary key for the table. If a "new" operation is performed the POS will automatically generate the next acceptable value without further input.
Deprecated. Displays the record that matches the current Telephone caller id information. This has fallen away as computers do not include hardware capable of providing caller id as much.
Selectively enables and disables various features on a lookup() screen. The parameter Z is a comma seperated list with the following keywords.
|new||Enable the "new" button, if the user is authorised, and allow creation of a new record|
|edit||Enable the "edit" button, if the user is authorised, and allow changes to a selected record|
|delete||Not currently implemented. Delete is enabled automatically if the user has access to both new and edit.|
|allsearch||Display the allsearch field, which allows the user to type into a single field and search all displayed columns. This saves both time and is easier for many users as they do not need to understand the exact distiniction between fields on the database.|
|noextended||Disable the post create functions that automatically appear when some tables are editted. A common example is that creating a new product can invoke a series of questions about labelling and stock levels. Specifying enable(noextended) disables the display of these extra questions.|
|nobulk||Do not allow the user to perform bulk edit operations|
|nohide||Do not display the "Show Hidden Items" tickbox to allow the user to select hidden items This might be used on selling lanes to disable the staff from displaying hidden items and then selling them.|
|barcode||Allow the user to scan barcodes, and restrict the list to only the items with those barcodes. This is only supported when the products table is being reviewed.|
|paste||Automatically apply clipboard as edit commands. Do not enable without understanding implications|
|nodelete||Disable the delete option. This overrides all other decisions around delete and ensures users cannot delete.|
Show and permit the "edit" and "new" buttons, if the user is authorised. However, also disable the bulk entry mode which is typically enabled.
Retired. Do not use.
Create a new sale if one does not already exists This is not widely used, it is clearer to create the sale
before issuing the lookup command. eg use
input(prompt(Database Table) posc(lookup(%PARAM%,u_rnd_%PARAM%)))