Name of key item used to browse the data file, view or query. This item must be a search key of data file, view or query. The lower and upper bounds will be applied to this item.

<Lower Bound>: Type of search item

Minimum value (inclusive) of search item (if the search key is defined with an ascending browse in the analysis). The records corresponding to this minimum value will be included in the filter. For a descending browse (which means if the search key is defined with a descending browse in the analysis), it is the maximum value of the search item. The type of this parameter must correspond to the type of search item. For example, if the search item is a string, the lower bound must also be a string.

<Upper Bound>: Type of search item, optional parameter

Maximum value (inclusive) for the search item (ascending browse). The records corresponding to this maximum value will be included in the filter. The type of this parameter must correspond to the type of search item. For example, if the search item is a string, the upper bound must also be a string. For a descending browse, it is the minimum value of the search item.If this parameter is not specified, the upper bound corresponds to the value of <Lower Bound&gt.

<Selection Condition>: Optional character string (with quotes)

Selection condition used to create the filter (see the Notes). This selection condition can be a character string in Ansi or Unicode format.

the current record corresponds to the last record read with the filter.

For example:

On a filtered data file, after the function:

the current record is:

HReadFirst

the first file record corresponding to the filter

HReadLast

the last file record corresponding to the filter

HReadNext (or HForward)

the next record (or the next nth record) corresponding to the filter

HReadPrevious (or HBackward)

the previous record (or the previous nth record) corresponding to the filter

Selection Condition

The general syntax of a condition has the following format:

"CustomerName>'Smith' and (ZipCode=34 or ZipCode=32)"

The supported operators depend on the type of items used in the condition:

<>

Different

Valid for all types

>

Greater than

Valid for all types

>=

Greater than or equal to

Valid for all types

<

Less than

Valid for all types

<=

Less than or equal to

Valid for all types

=

Strictly equal to

Valid for all types

~=

Almost equal to: ignores the space characters on the right, the accented characters, the lowercase and uppercase characters

Valid for string types only

~~

Very flexible equality: does not distinguish between lowercase and uppercase characters, ignores the space characters found before and after the string to test, ignores the lowercase accented characters, ignores the space characters and the punctuation characters inside the strings.

Valid for string types only

]

Contains: takes the lowercase and uppercase characters into account

Valid for string types only

~]

Contains: ignores the lowercase and uppercase characters

Valid for string types only

]=

Starts with: takes the lowercase and uppercase characters into account

Valid for string types only

The ~~ and ~= operators must not be used. These operators are not allowed.

Notes about the selection condition:

The constant strings must be enclosed in simple quotes.

If <Item Name> contains simple quotes, they must be doubled. For example: Itemwithquotes

The comparisons between strings are performed according to the parameters specified for the indexes.

The binary memos and the composite keys cannot be part of a selection condition. For the composite keys, we recommend that you use the first syntax. The following syntax cannot be used:

If a character string (constant or variable) contains a simple quote, this simple quote must be preceded by a backslash character ( \ ).

To optimize the browse operations, apply HStatCalculate to the data file before creating the filter. Indeed, the HFSQL engine analyzes the selection condition and it uses these statistics to define the most discriminating items that will be used to optimize the browse performed on the data file.

This selection condition can be a character string in Ansi or Unicode format.