Advanced Grid Filtering

Updated 2 months ago by Tony Runyan

Advanced Grid Filtering

Red Stag Fulfillment grids contain form fields in the header row which allow you to filter the results. Enter or select your filters and then click "Search" to apply the filters.

When using the Export feature you must click "Search" before you click Export if you want your filters to apply to the exported data.

For grid columns that contain a single text input field you can enter a search query that will be matched against that column field. By default the search will be matched using a prefix search. For example, a search for "ABC" will match "ABCD" but not "XABC".

If you want more control over your search there are many features at your disposal which are described below. The examples given below assume your are searching a grid columns where the full data set includes the following values:

  • Red
  • Red-b
  • Red-c
  • Yellow
  • Yellow-b
  • Rose

Prefix Match (default)

Example Serach Term

Matches

Ignores

Red

Red, Red-b, Red-c

Yellow, Yellow-b, Rose

R

Red, Red-b, Red-c, Rose

Yellow, Yellow-b

Specify an asterisk (*) anywhere you would like to use a wildcard (matches zero or more characters).

Example Search Terms

Matches

Ignores

*low

Yellow

Red, Red-b, Red-c, Yellow-b, Rose

*low*

Yellow, Yellow-b

Red, Red-b, Red-c, Rose

R*-b

Red-b, Rose-b

Red, Red-c Yellow, Yellow-b, Rose

Exact Match (Using the "EQ" keyword)

Example Search Term

Matches

Ignores

EQ Red

Red

Red-b, Red-c Yellow, Yellow-b, Rose

Negative Match (Using the "NEQ" keyword)

You can specify the exact values that you would like to not match using NEQ ("not equals").

Example Search Term

Matches

Ignores

NEQ Red

Red-b, Red-c Yellow, Yellow-b, Rose

Red

Empty Values

You can match fields with empty values using a single -. This matches both the empty string "" and NULL values.

Example Search Term

Matches

Ignores

-

(All)

Null or Not Null

Sometimes you may need to find specifically values that are null (empty) or not null (not empty).

Example Search Term

Matches

Ignores

NULL

(empty values)

(non-empty values)

NOT NULL

(non-empty values)

(empty values)

List of Values (Using the "IN" keyword)

If you want to match a list of exact values you can separate the values with a comma and use the IN keyword.

Example Search Term

Matches

Ignores

IN, Red, Yellow, Rose

Red, Yellow, Rose

Red-b, Red-c, Yellow-b

Regular Expressions (Using the "REGEXP" keyword)

Regular expressions are an advanced language that is very powerful. See the MySQL documentation for complete information as it pertains to the grid searches.

Example Search Term

Matches

Ignores

REGEXP ^[A-Z]e.+

Red, Red-b, Red-c, Yellow, Yellow-b

Rose

The above example says to match any value that begins with an uppercase letter in the range from "A" to "Z" followed by a lower-case "e" followed by any character one or more times.

Boolean Search (Using "AND" and "OR")

You can specify multiple of any of the above searches by combining them with boolean AND logic (all must match) and OR logic (any must match).

Example Search Term

Matches

Ignores

Red OR Yellow

Red, Red-b, Red-c, Yellow, Yellow-b

Rose

R* AND NEQ Red-b

Red, Red-c, Rose

Red-b, Yellow, Yellow-b

IN Red, Rose OR *-b

Red, Red-b, Yellow-b, Rose

Red-c, Yellow


How did we do?