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. If you don’t include the wildcard character in the filter field by default it will be added to the end, so the filtering will only display rows that start with the text entered. 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. If you don’t want to use a wildcard at all then you need to enclose the filter text in double quotes.
You can also combine two text filter if you want to match multiple values using | (pipe).
Entered Value | Filter | 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” |
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 |
Time filtering with SQL Server
If when filtering data from a SQL Server database you receive errors about the data types time and datetime being incompatible you can resolve this by setting sendTimeAsDatetime
to false
as a parameter in the connection URL, e.g.
<jdbc:datasource id="sqlserver">
<driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
<url>jdbc:sqlserver://sqls2014:1433;databaseName=GIS;sendTimeAsDatetime=false</url>
<username>gisrw</username>
<password>ENCTXTJJPCQPAJUCKKMABFJEBZJAKFCXGME</password>
</jdbc:datasource>