RAD function: evaluate.query

A RAD function that evaluates a query against a record. Both are passed as function parameters.

Function

evaluate.query()

Format

$L.rc=evaluate.query( <query>, <file variable> )

Function returns

true: if the record matches the query.

false: if it does not match the query.

unkown: if a comparison in the query encountered a NULL value or a field was referenced in the query that does not exist in the record.

null: if the function was called incorrectly.

Parameters

The following parameters are valid for the evaluate.query function:

Parameter Data type Description
query"<query>" operator or character Can be a previously parsed query or a string containing a query
record"<file variable>" record Must be a valid file variable

Examples

$x = evaluate.query( "true", $L.file )

This example returns TRUE for any valid file variable.

$query = parse( "contact.name # \"S\" ", 4 )
$y = evaluate.query( $query, $L.filed )

This example returns TRUE only for contacts records that start with "S" and FALSE for every other contacts record.