Filtering the Grid Source
1. Filter Box Syntax
- Invoke the Live-Search (View > Live-Search). Details here: 1. Live-Search
- For more complex filters, use Advanced Search (View > Advanced Search). Details here: 3. Advanced Search Pane
Filter Examples
[MyField]
[MyField] is not null
[MyField] is Null
[MyTextField] = "test"
[MyTextField] like "*test*"
[MyNumberField] = 34
[MyDateField] = #2001-12-31#
:
Date = Dec 31th 2001int([MyDateField]) = #2001-12-31#
:
If date contains time information, Date = Dec 31th 2001[MyCheckBox]
: Checkbox is checked[MyCheckBox] is null
: Checkbox is unchecked[ItemCreated] > now-7 and [ItemCreated] < now :
This will give you the last 7 days, and it is dynamic (as "now" returns the current date/time)[item] like "*journal*" and [item] not like "*supplem*"
: Show Journal item but not those that are Supplemental[ItemFont] like "*s*"
: Shows all items that are marked with a strikethru
Filter Operators
In addition, you can use the following operators in filters:
- =
- <>: not equal to
- >: greater than
- <: less than
- is null: has no value
- NOT: negates an expression
- LIKE: for text string (see above example)
- AND: both conditions are required
- OR: either condition is required
- ( ): use parenthasis to set filter parsing
The maximum Filter length is 64000 (which should be enough :).
See also Source bar filter for a good example of how to filter for content within a field
2. Sub-Item Filter
- If it is checked, then the Filter (and only the filter, not the source, alpha, date, or column filters) is used to show only subs meeting this filter.
Say your source is 'Project="Somiro"' and the filter is 'done is null'. The initial list will give you items related to project Somiro.
On clicking on the + of an item, you'll only get the subs that have 'done=null' (i.e. not done), instead of all subs.
To see all, right-click and select 'show all subs'.
2.1 Sub-Item Specific Filter
Main Filter (level 1) | Sub-items Filter (level 2) | Sub-sub-items Filter (level 3)
3. Saving Filters
4. Deleting Filters from the drop down list
5. Using Tags as Filters
The above explained how to use fields in filters. Tags can also be used in filters. There are a few differences when compared to Y/N fields:
- Tags are not [ ] enclosed, instead, they are preceded with #, i.e. #Tag1
- Do not use the Null keyword as you would do with fields:
- Case Tag1 must be set, use: #Tag1
- Case Tag1 must not be set, use: NOT #Tag1
Read all about using tags (including using them in grid source and filters) here: 3. Tags
6. Other Sample Filters
6.1 View / manage tasks
To track items due/done this week, for those that manage tasks on a weekly, not daily basis. The filter text is:
([DueDate] >= #2022-06-12#) OR ([DueDate] is Null) OR (([DueDate] < #2022-06-12#) AND ([Done] is Null)) OR ([Done] >= #2022-06-12#)
There are 4 conditions separated by OR. The logic is:
- Due this week: ([DueDate] >= #2022-06-12#)
- No due date, i.e. newly created items: ([DueDate] is Null)
- Overdue from last week: (([DueDate] < #2022-06-12#) AND ([Done] is Null))
- Done this week, i.e. could have been due before this week, so not covered in condition 1: ([Done] >= #2022-06-12#)
The filter date is always the Sunday before the week starts, and once a week on Monday morning it is updated. (Thanks to Cyganet for this sample filter)