Filter Wildcard Compare Types

The Wildcard compare type (%W) in an ActionWare filter is used to specify a pattern that performs a wildcard scan of a character field.

 It can be used to find multiple characters, or strings of characters, in a field. It is similar to the 'contains' function, except that with 'contains' you can only search for a single string of characters within a field. Wildcard is much more versatile.

Rules for Using Wild Cards in a filter:

  1. When using wildcard, there are two characters with special meanings, these are called wildcard characters. They are (1) an underscore ('_') to match any single character, and (2) an asterisk ('*') to match a string of characters. Because they have this special meaning, underscores and asterisks cannot be searched for as data characters when doing a wildcard scan.

  2. An underscore means any character in that position in the field is acceptable. Any number of underscores can be specified.

  3. An asterisk before a character indicates any number of any characters are acceptable up to that character. An asterisk after a character indicates any number of any characters are acceptable beyond that character. Zero, one, or two asterisks can be specified. Note that an underscore (sometimes called an underline) character is virtually invisible if you are looking at it in an input field where the whole field is already underlined by default. This can be very confusing.

  4. The apostrophe also needs special care. If you do want to use an apostrophe in the Compare Data field, it must be entered as two apostrophes. For example, if you are searching for contact records that have the character string NAT'L in the company name, you must use NAT''L in the compare data. WARNING- Do not confuse using two adjacent single apostrophes with the double quote character. In some fonts it is not possible to tell the difference between two adjacent single apostrophes and one double quote character.

Compare type:

Value:

What happens:

%W

Wild Card

This compare type is used when the data is to be searched according to wild card rules

%L

List

This compare type is used on a new line following a normal line containing any of the standard compare types and the line has no entries other than the compare data

%R

Range

This compare type can appear on a new line following a normal line containing any of the standard compare types and the line has no entries other than the compare data. It indicates this line represents the high end of the range. The low end of the range is the compare data specified on the previous line containing the standard compare type. One line containing this compare type is allowed after a normal line.

Example #1 %W = Wild Card

In this filter we want all contact records where the CIT field contains 'N', followed by any character and an 'w', appearing anywhere in the field. The City field ID is CIT. The results are any City with New in it's name, New York, New Hudson, Newport Beach, etc. Note that an underscore must be used to indicate the character between N and w (N_w).

Filter Maintenance

and /or

include if field

position /length

upper case

compare type

compare number, or "characters" or &fieldName

or %V (dept) or %T (date) or %U (user id)

 

CIT

___

____

__

%W

"*N_w*"______________________

____

______

___

____

__

____

______________________________

____

______

____

____

__

____

______________________________

____

______

____

____

__

____

______________________________

             
             

Example #2 %L = List

In this filter we want all contact records for the States of California, Colorado and Connecticut. The State field ID is STA.

Filter Maintenance

and /or

include if field

position /length

upper case

compare type

compare number, or "characters" or &fieldName

or %V (dept) or %T (date) or %U (user id)

 

STA

___

____

__

EQ

"CA"_________________________

____

______

___

____

__

%L

"CO"_________________________

____

______

____

____

__

%L

"CT"_________________________

____

______

____

____

__

____

______________________________

             
             

Example #3 %R = Range

In this filter we want all contact records with the zip codes with a range from 94111 to 94199. The Zip code field ID is ZIP.

Filter Maintenance

and /or

include if field

position /length

upper case

compare type

compare number, or "characters" or &fieldName

or %V (dept) or %T (date) or %U (user id)

 

  ZIP

___

____

__

EQ

"94111"_____________________

____

______

___

____

__

%R

"94199"_____________________

____

______

____

____

__

____

______________________________

____

______

____

____

__

____

______________________________