pCDLSelect
pCDLSelect
Select data from a given set specification.
Syntax
pCDLSelect ( out vlStatus,
in vlOperation,
inout vlNumRecords,
in vlTitle,
in vlSetName,
in vlSetSpec,
in vlNumEntSets,
in vlFieldName )
Parameters
vlStatus | The output parameter indicating the success or failure of the program. |
vlOperation | This parameter indicates if pCDLSelect should enable a find operation or close the window. |
vlNumRecords | The number of records selected in the resulting set. |
vlTitle | The window caption to use for the select window. |
vlSetName | The name of a set that is created by the selection process. |
vlSetSpec | The set specification to search for a specific value. |
vlNumEntSets | The number of components in the set specification. |
vlFieldName | The initial field name to be displayed in the field list. |
Comments
The pCDLSelect function displays a window containing a list of fields in the target set, a list of possible comparison operations (equal, less than, and so on) and a comparison value. The list of fields is taken either from a variable vFieldList or from a set called sFieldList which must be a set defined on Fields. (Both vFieldList and sFieldList are defined in $DeployServices). If vFieldList is neither blank nor $NULL, it is assumed to contain a list of field names, delimited by a semicolon (e.g. “LastName;FirstName;DepartmentNum”). If vFieldList is either blank or $NULL, then sFieldList is used. In all cases, when pCDLSelect returns, vFieldList is set to $NULL.
The field names are shown with their owner’s name if vlNumEntSets is greater than one. If vlFieldName is specified, it becomes the initial field in the list. When Select is pressed, the combination of a selected field name, a comparison operator, and a value are combined with vlSetSpec to find a set of database records satisfying the comparison. Alternatively, if Select All is pressed, all records are selected. In both cases, the set can replace the set named in vlSetName; it can be UNIONed with the set; it can be INTERSECTed with the set, or it can be MINUSed from the set.
On the first call to pCDLSelect, vlOperation should be set to “SELECT”. If a selection is made, pCDLSelect returns with vlStatus equal to “OK” but the window remains open. Another call to pCDLSelect should be made with vlOperation set to “CLOSE” or “SELECT”. For “CLOSE”, the window is closed and vlStatus is returned as “COMPLETE”. For “SELECT”, the user can decide to perform either another Select operation or the Select window can be closed by selecting the Close button. In the latter case, vlStatus is set to “COMPLETE”.