SIMPOL Documentation

tablesearch()

Description

This function provides a pick list functionality implemented using a dialog and a grid control. Once the user selects a row from the grid and clicks on OK, then the valuefield of the selected record will be returned to the caller as the function return value. It also includes an optional whereclause parameter, though it may only be applied to the database table associated with the valuefield parameter. The dispfields contains the field names for the fields that should be dislayed and are listed by name separated by semi-colons. The column widths can be specified in the colwidths parameter as a semi-colon-separated list. They will be applied in the order received, just like the display fields. To make it easier to establish the best column widths, set the showcolwidths parameter to .true and the column widths will be displayed. This is very useful during development.

Prototype

tablesearch ( type(wxdialogparent) parent, integer width, integer height, type(db1field) valuefield, type(db1index) orderidx, string whereclause, string dlgtitle, string searchcap, string OKtext, string canceltext, string readytext, string workingtext, string dispflds, string colwidths, string defboolean, string definteger, string defnumber, string defdate, string deftime, string defdatetime, SBLlocaledateinfo datelocale, SBLNumSettings numlocale, boolean showcolwidths, boolean allowcolwidthdrag, integer error )

Parameters

ParameterDefault valueType nameDescription
parentNonetype(wxdialogparent)
widthNoneinteger
heightNoneinteger
valuefieldNonetype(db1field)
orderidxNonetype(db1index)
whereclauseNonestring
dlgtitleNonestring
searchcapNonestring
OKtextNonestring
canceltextNonestring
readytextReady.string
workingtextWorking...string
dispfldsNonestring
colwidthsNonestring
defbooleanT|Fstring
definteger.string
defnumber999999.00string
defdateyyyy.0m.0dstring
deftimehh:mm:ssstring
defdatetimeyyyy-mm-dd hh:mm:ss.nnnnnnstring
datelocaleNoneSBLlocaledateinfo
numlocaleNoneSBLNumSettings
showcolwidths.falseboolean
allowcolwidthdrag.trueboolean
errorNoneinteger