RDD

DbSetFilter()

Set a filter condition

Syntax

Signature
DbSetFilter( bCondition, [cCondition] ) --> NIL

Arguments

bCondition

Filter block. cCondition Optional textual expression.

Return value

NIL.

Description

DbSetFilter() restricts navigation in the current work area to records for which bCondition returns true.

Notes

Use DbClearFilter() to remove the filter. The filter does not delete records.

Example

DbSetFilter.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   DbSetFilter( {|| FIELD->AGE >= 18 }, "AGE >= 18" )
   QOut( "Filter: " + DbFilter() )
   DbCloseArea()

RETURN

Output

See also