tips:revmedia:subs9

FILTER.ACTIVE

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies14 NOV 19892.XEXPERTFILTER.ACTIVE

FILTER.ACTIVE is a subroutine that activates and executes the specified filter.

FILTER.ACTIVE(filter.key, filter)

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.

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.

/* 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"
  • tips/revmedia/subs9.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1