Fieldpine Logo Documentation Home  
POS Commands Home

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(call(ZZZ))

lookup(psql(ZZZ), KeyName, Arguments )

lookup(gnap(ZZZ), KeyName, Arguments )

lookup(mesh(ZZZ), KeyName, Arguments )


Directives

font(Z)

event(Z)

eventfile(Z)

Retired. Ignored.

at(Z)

title(NN)

Sets the title of the Window to NN. The default value of the title is typically only the underlying table name.

ok(Z)

report(Z)

refresh(Z)

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.

mode(Z)

order(Z)

button(Z)

fields(Z)

flags(Z)

filter(Z)

gnaphost(Z)

key:ZZZ

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.

unique:Z

from:callerid

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.

enable:Z

Selectively enables and disables various features on a lookup() screen. The parameter Z is a comma seperated list with the following keywords.

KeywordDescription
newEnable the "new" button, if the user is authorised, and allow creation of a new record
editEnable the "edit" button, if the user is authorised, and allow changes to a selected record
deleteNot currently implemented. Delete is enabled automatically if the user has access to both new and edit.
allsearchDisplay 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.
noextendedDisable 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.
nobulkDo not allow the user to perform bulk edit operations
nohideDo 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.
barcodeAllow 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.
detail
nodetail
pasteAutomatically apply clipboard as edit commands. Do not enable without understanding implications
nodeleteDisable the delete option. This overrides all other decisions around delete and ensures users cannot delete.

Examples

lookup(products,,enable:new:edit,nobulk)

Show and permit the "edit" and "new" buttons, if the user is authorised. However, also disable the bulk entry mode which is typically enabled.

tie:Z

modeless

auto:Z

fly:Z

goto:Z

makemode

script:Z

Retired. Do not use.

?sale

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 sale? lookup(products) rather than lookup(products,,?sale)

salefind

custfind

initial:Z

button:Z


Examples

lookup(products,u_lu_products,fields(plucode,description),key:pid,salefind)

input(prompt(Database Table) posc(lookup(%PARAM%,u_rnd_%PARAM%)))