Develop > Programming > System Language reference > List: rtecalls > rtecall ("select") function

rtecall ("select") function

A RAD function that retrieves a list of records for a file in ascending or descending order according to the specified sort fields and group fields.

Function

rtecall("select")

Format

$L.success.flg=rtecall($L.fnc.name, $L.return.code, $L.file, $L.query, $L.sortfields, $L.sorttype, $L.groupfields, $L.groupsorttype, $L.columns)

Parameters

The following parameters are valid for the rtecall("select") function:

Parameter Data Type Description
$L.success.flg Logical Indicates whether the function is successful or not.
$L.fnc.name String Name of the sub-function to call. This parameter is "select" in this case.
$L.return.code Number

Provides a more detailed return code:

  • 1: Only one record found
  • 2: Multiple records found
  • 3: No records were found
  • 4: Query reached a timeout
$L.file File A file handle that represents the record list.
$L.query String The query condition for retrieving records.
$L.sortfields Array The array of fields which the record list is sorted by.
$L.sorttype Logical The sorting order. true is descending, and false is ascending. By default, this value is false.
$L.groupfields Array The array of fields which the record list is grouped by.
$L.groupsorttype Logical The sorting order for group fields. true is descending, and false is ascending. By default, this value is false.
$L.columns Array The array of the selected fields of the file.

Factors

  • If $L.success.flg is false, the function fails. If $L.success.flg is true, the function succeeds.
  • The parameters after $L.query are optional.

Example

$L.success.flg=rtecall("rinit", $L.return.code, $L.operator, "operator");

$L.success.flg=rtecall("select", $L.return.code, $L.operator, "contact.name=contact.name in $L.file", {“last.login”}, false, {“company”}, false, {“name”, “contact.name”, “company”});