Filtering Data
The grid panels contain a filter control that allows you to refine the displayed results.
The filter allows you to enter a value into the text field that will be used to refine the rows displayed in the grid based on the values stored in a single column, which can be chosen by clicking on the Filter
button to the left of the text field.
Based upon what type of data is stored in each column, there are different filters that can be used to refine the rows. For example, if a column contains text then the column can be filtered based on matching characters in the text, but if the column contains numbers then the column can be filtered based on the values being less than a particular number.
Text
The filtering for text is case sensitive and is based on wildcards, using * as the wildcard character.
By default if you don’t include the wildcard character in the filter field one will be added to the end, so the filtering will only display rows that start with the text entered, but this can be disabled by setting stringFilterWildcard
to false
in the grid panel config.
If you want to display rows that contain the filter text in the middle then you need to add * to the start and the end. If you want to filter based on the text ending with the filter value then you just add the * at the start. To use an * in the filter, without it being interpreted as a wildcard placeholder, then you should precede it with the \ character. To use a \ in the filter before an * and have it interpreted as a slash followed by a wildcard, as opposed to an asterisk, use a double \.
If you don’t want to use a wildcard at all and search for the exact text entered then you can enclose the filter text in double-quotes, this will also disable the evaluation of \ and * characters and treat them and regular characters (and not escape or wildcard markers).
You can also combine two text filter if you want to match multiple values using | (pipe).
The following table shows the values the user enters and what the actual filter value will be, assuming stringFilterWildcard is true, which is the default, and what values the filter would match.
Entered Value | Filter Value | Matches |
---|---|---|
WATSON CREEK | WATSON CREEK* | Values that start with “WATSON CREEK” |
WATSON CREEK* | WATSON CREEK* | Values that start with “WATSON CREEK” |
*WATSON CREEK | *WATSON CREEK | Values then end with “WATSON CREEK” |
*WATSON CREEK* | *WATSON CREEK* | Values that contain “WATSON CREEK” |
“WATSON CREEK” | “WATSON CREEK” | Values that are “WATSON CREEK” |
WATSON|FIDDLER | WATSON*|FIDDLER* | Values that start with “WATSON” or “FIDDLER” |
“WATSON”|FIDDLER | “WATSON”|FIDDLER | Values that are “WATSON” or start with “FIDDLER” |
*WATSON|”FIDDLER” | *WASTON|”FIDDLER” | Values that end with “WATSON” or are “FIDDLER” |
C\*Productions | C\*Productions* | Values that start with “C*Productions” |
*C\*Prod* | *C\*Prod* | Values that contain “C*Prod” |
“C*Productions” | “C*Productions” | Values that are “C*Productions” |
\* | \** | Values that begin with “*” |
*\** | *\** | Values that contain “*” |
*\* | *\* | Values that end with “*” |
*\\* | *\\* | Values that contain “\” |
\\* | \\* | Values that start with “\” |
\\\* | \\\* | Values that are “\*” |
“*” | “*” | Values that are “*” |
“\*” | “\*” | Values that are “\*” |
“\\\*” | “\\\*” | Values that are “\\\*” |
Numbers
If you’re filtering a column of numbers then just entering a number will filter the rows that match that value, there is no wildcard as for a text field. If you want to include numbers less than, less than or equal, greater than or greater than or equal then you can precede the value with <, <=, > or >=, or use <> for not equal.
You can also combine two numeric filters if you want only columns within a range, using a space between the values for and, and a | for or.
Entered Value | Matches |
---|---|
100 | Values that are 100 |
<100 | Values less than 100 |
<=100 | Values less than or equal to 100 |
>100 | Values greater than 100 |
>=100 | Values greater than or equal to 100 |
<>100 | Values other than 100 |
>100 <200 | Values greater than 100 and less than 200 |
<100 | >200 | Values less than 100 or greater than 200 |
Dates
Dates are handled in a similar way to numbers, where entering a value will filter based on that value, but you can also specify range filters. You must also ensure that the date, time or timestamp value used in the filter is entered in a specific format to avoid confusion when parsing the date/time.
Column Type | Entered Format | Example Value | Matches (inclusive to exclusive) |
---|---|---|---|
Date | yyyyMMdd | 20191014 | 14 Oct 2019 to 15 Oct 2019 |
| yyyyMM | 201910 | 1 Oct 2019 to 1 Nov 2019 |
| yyyy | 2019 | 1 Jan 2019 to 1 Jan 2020 |
Time | HHmmss | 123456 | 12:34:56pm 12:34:57pm |
| HHmm | 1234 | 12:34pm to 12:35pm |
| HH | 12 | 12:00pm to 1:00pm |
Timestamp | yyyyMMddHHmmss | 20191014123456 | 12:34:56pm 14 Oct 2019 to 12:34:57pm 14 Oct 2019 |
| yyyyMMddHHmm | 201910141234 | 12:34pm 14 Oct 2019 to 12:35pm 14 Oct 2019 |
| yyyyMMddHH | 2019101412 | 12:00pm 14 Oct 2019 to 1:00pm 14 Oct 2019 |
| yyyyMMdd | 20191014 | 12:00am 14 Oct 2019 to 12:00am 15 Oct 2019 |
| yyyyMM | 201910 | 12:00am 1 Oct 2019 to 12:00am 1 Nov 2019 |
| yyyy | 2019 | 12:00am 1 Jan 2019 to 12:00am 1 Jan 2020 |
Column Type | Entered Value | Matches |
---|---|---|
Date | <20191014 | Before 12:00am 14 Oct 2019 |
| <201910 | Before 12:00am 1 Oct 2019 |
| <2019 | Before 12:00am 1 Jan 2019 |
| <=20191014 | Before 12:00am 15 Oct 2019 |
| >20191014 | At or after 12:00am 15 Oct 2019 |
| >=20191014 | At or after 12:00am 14 Oct 2019 |
| <>20191014 | Before 12:00am 14 Oct 2019 or at or after 12:00am 15 Oct 2019 |
| 20191014 | At or after 12:00am 14 Oct 2019 and before 12:00am 15 Oct 2019 |
| >=20191014 <20191021 | At or after 12:00am 14 Oct 2019 and before 12:00am 21 Oct 2019 |
| <20191014 | >= 20191021 | Before 12:00am 14 Oct 2019 or at or after 12:00am 21 Oct 2019 |
| 201902 | 201905 | At or after 12:00am 1 Feb 2019 and before 12:00am 1 March 2019 or at or after 12:00am 1 May 2019 and before 12:00am 1 June 2019 |
Time | <1430 | Before 2:30pm |
| <=1430 | At or before 2:30pm |
| >1430 | At or after 2:31pm |
| >= 1430 | At or after 2:30pm |
| <>1430 | Before 2:30pm or at or after 2:31pm |
| >=14 <16 | At or after 2:00pm and before 4:00pm |
| <14 | >=16 | Before 2:00pm or at or after 4:00pm |