FILTER.ACTIVE
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 14 NOV 1989 | 2.X | EXPERT | FILTER.ACTIVE |
FILTER.ACTIVE
FILTER.ACTIVE is a subroutine that activates and executes the specified filter.
FILTER.ACTIVE(filter.key, filter)
Using FILTER.ACTIVE
Use FILTER.ACTIVE to activate a selection process that can optionally have been stored as a record in a file (FILTERS, for example). This subroutine also updates the system variable @LAST.SELECT.PROCESS with the value of filter.key, if any.
filter.key
Use filter.key to pass the record key of the specified filter. This is used to reset @LAST.SELECT.PROCESS (see Appendix 1, "System Variables").
filter
Use filter to pass the filter to be used. Filter is a regular SELECT statement except that the word SELECT must not be used. FILTER.ACTIVE will supply the word "SELECT". If a browse list is currently active (@BROWSE.MODE is true), it is saved and restored upon execution of filter.
Values returned
None. The filter is activated. If @BROWSE.MODE is true (see Appendix 1, ``System Variables''), the select list is converted to a browse list (truncated to 32K). @LAST.SELECT.PROCESS is reset to filter.key.
Correct Use of FILTER.ACTIVE
/* The following code specifies a filter, then activates and executes it by means of FILTER.ACTIVE. It also updates @LAST.SELECT.PROCESS with the name of the filter. Both the name of the filter and the filter specification could have come from a file, as for example, from FILTERS, where the name would be the record key. */ DECLARE SUBROUTINE FILTER.ACTIVE filter.key = "TEST.FILTER" filter = "SAMPLE_CUSTOMERS WITH STATE = 'NY'" FILTER.ACTIVE(filter.key, filter) PERFORM "LIST SAMPLE_CUSTOMERS"