[TOC] [Prev] [Next] [Bottom]



<@FILTER>

Syntax

<@FILTER ARRAY=arrayVarName EXPR=filterExpr [SCOPE=scope] [{array attributes}]>

Description

Given an array, this meta tag returns an array containing rows matching a specified expression. The ARRAY attribute specifies the name of a variable containing an array. The EXPR attribute specifies the expression to use when evaluating each row to determine whether it will be in the array returned. In this expression, the values from the current row are specified with a number sign (#), followed by the column name or number. (See the examples following.) This expression may use any operators and functions supported by the <@CALC> tag. If the expression evaluates to 1 (true) for a particular row, that row appears in the output array.

The SCOPE attribute specifies the scope of the variable specified in the value of the ARRAY attribute. If SCOPE is not specified, the default scoping rules are used.

There are array-returning attributes that can be used to specify prefixes and suffixes for the returned array, rows within the array, and columns within the rows. They are described in the section Array-to-Text Conversion Attributes. By default, the returned array is formatted as an HTML table.

Meta tags are permitted in any of the attributes, but see the following note. Meta tags specified in EXPR are evaluated for each row in ARRAY.


! Note: References to columns inside the EXPR attribute cannot be specified by meta tags.


Examples

See Also

Array-to-Text Conversion Attributes
<@ADDROWS>
<@DELROWS>
<@DISTINCT>
<@INTERSECT>
<@SORT>
<@UNION>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1999, Pervasive Software. All rights reserved.