Skip to content

User Help

Advanced Filtering Tips

Tip 1: Wildcard Searches

When building a filter condition using the Like operator with a character or memo data item, you may use “wildcard” characters to specify a partial filter value entry. The wildcards (by default) are “%” (percent sign) and “_” (underscore character).

The “%” wildcard takes the place of one or more characters appearing in the beginning of a word. For example, a filter condition of "Customer Name is Like %LIS" would retrieve names like "Alison," "Alissa," and "Elissa." A "%" is assumed for characters appearing at the end of a word. A filter condition of "Customer Name is Like LIS" would retrieve names like "Lisa," "Lissa," and "Lisalyn."

The “_” takes the place of only a single character. A filter condition of “Customer Name Is Like LIS_” would retrieve “Lisa,” since the underscore character indicates that there is exactly one wildcard character.

If you need to search for a character string which really does include one of these wildcard characters, precede it with a '~' (the tilde character). Thus, a search value “A_” would find all two-letter strings beginning with “A” while “A~_” would look for the exact string “A_”.

Note: Your system may be set up to use other wildcard characters. For details, contact your developer.

Tip 2: Using Parentheses to Change Order of Evaluation

When you mix AND and OR operators in complex filters, the order of evaluation of the filter conditions can change the results. Foxfire! automatically evaluates AND conditions first, then OR conditions. In the above example, Mileage Less Than 175000 would be associated with MERCEDES while the Mileage Less Than 15000 would be associated with FORD.

( ) Let you control the order in which conditions are evaluated when is used to combine conditions. The expression inside the parentheses is evaluated first. Parentheses only affect the evaluation sequence when there is a mixture of AND and OR connectors in the filter.

Note: Use of parentheses in filters is an advanced feature. The feature can be turned off (i.e., the parentheses buttons are not displayed) in the Report Set Editor’s Privileges dialog.


Tip 3: Using the “In the List” Operator

When you want to compare one data item to multiple possible values, use the In The List operator instead of a series of individual conditions with OR connectors.

Example: You want a report of red, blue, and green cars. You can build the filter condition as Cars Color Is In The List Red, Blue, Green.


Tip 4: Connecting Is(Not) Conditions

Avoid connecting two Is Not conditions with an OR if possible. Connecting two negative filter conditions is logically permissible, but confusing.

If you must connect two negative filter conditions, think carefully about the meanings of AND and OR connectors. It is better to rephrase them as positive conditions, if possible.

Example: To select only Cars that are neither RED nor WHITE, use AND, not OR, refer to the table below.

Incorrect   (Cars Color Is Not RED OR Cars Color Is Not WHITE)  

Correct   Cars Color Is Not RED Cars Color Is Not WHITE  

Even Better   Cars Color Is Not In The List  RED, WHITE  

Each record is tested against all the conditions. The first condition is incorrect because white cars will be selected by the expression COLOR Is Not RED and red cars will be selected by the expression COLOR Is Not WHITE. This expression actually defeats itself by selecting cars of any color!

Note: If there is an OR in the filter, the order of the filter conditions can completely change the effect of the filter. If there is no OR, the order of the criteria has no effect on the query's results or execution.


Tip 5: Using “Like” Instead of “Exactly Like”

For most filter conditions, “Like” is sufficient to get the results you wish, and is preferable from a performance standpoint. Foxfire! has query optimization built-in that makes most “Like” criteria lightning-fast, while “Exactly Like” requires much more (and slower) disk activity for record-by-record comparison.

Exactly Like is needed only in the rare circumstance where you must consider trailing spaces or data beyond the end of a filter value entry. The table below demonstrates the difference in results that occurs when you use Like in comparison with Exactly Like.




Filter condition
Result (records retrieved)
Cars. Make Is Like “GMC” 1981 GMC 1984 GMC Truck

Cars. Make Is Exactly Like “GMC” 1981 GMC

Cars. Make is Exactly Like “GMC Truck” 1984 GMC Truck



Tip 6: Creating a “Filter Only” Data Item

If you find yourself applying the same group of conditions repeatedly, or want to pre-define groups of conditions for others to use, you can create a single data item to simplify building filters.

In the sample data there is a filter-only data item called Jalopy. (It is called a filter-only data item because Jalopy doesn’t appear as a column of data in outputs; it is simply a set of filtering rules.)

What is a Jalopy?

It is a car whose model year is before 1980. It costs less than $500. It has more than 100,000 miles on its odometer.

You can refer to this filter-only data item in a filter condition whenever you want to impose these three conditions.

Filter-only data items are of the data type logical. You can use the Yes and No question to reverse the condition. If the Jalopy value is No, then the result will include all cars except “jalopies.”


Tip 7: Validating Entered Values

When filter condition values are entered, it is often helpful to have the program check whether the entered value is valid. The alternative is to run the whole Request, only to find out that a filter value was misspelled, and invalidated the results.

Foxfire!’s data item dictionary allows a variety of validation features to be applied to the entered values for individual data items. A “Pick List” can be displayed to validate the entered value, or to let the user choose from the popup instead of entering a value.
Topic identifiers and source notes

Original topic: _1YS10FTW5 · Help context: 289

Original filename: _1ys10ftw5.htm

Alternative source versions are retained for review. See this collection’s source notes.

Original page notices

Last Updated: 2/19/2007

Foxfire! product documentation · Legacy source notices are preserved in each topic.