[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SET FILTER
 Hide records not meeting a condition
------------------------------------------------------------------------------
 Syntax

     SET FILTER TO [<lCondition>]

 Arguments

     TO <lCondition> is a logical expression that defines a specific set
     of current work area records accessible for processing.

     SET FILTER TO without an argument deactivates the filter condition.

 Description

     When a FILTER condition is SET, the current work area acts as if it
     contains only the records that match the specified condition.  A filter
     condition is one of the properties of a work area.  Once a FILTER has
     been SET, the condition can be returned as a character string using the
     DBFILTER() function.

     Most commands and functions that move the record pointer honor the
     current filter with the exception of those commands that access records
     by record number.  This includes GOTO, commands specified with the
     RECORD clause, and RELATIONs linked by numeric expression to a work area
     with no active index.

     Once a FILTER is SET, it is not activated until the record pointer is
     moved from its current position.  You can use GO TOP to activate it.

     As with SET DELETED, a filter has no effect on INDEX and REINDEX.

     Note:  Although SET FILTER makes the current work area appear as if
     it contains a subset of records, it, in fact, sequentially processes all
     records in the work area.  Because of this, the time required to process
     a filtered work area will be the same as an unfiltered work area.

 Examples

     .  This example filters Employee.dbf to only those records where
        the age is greater than 50:

        USE Employee INDEX Name NEW
        SET FILTER TO Age > 50
        LIST Lastname, Firstname, Age, Phone
        SET FILTER TO

 Files   Library is CLIPPER.LIB.


See Also: DBFILTER() DBSETFILTER() SET DELETED
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson