Filtering the Grid Source

The grid source filters items to show only items matching the source. It mimics the "folder" concept, with the added advantage that if can also be a more complex source (e.g. ([Field1] OR [Field2]) AND [Field3])
 
An additional filter can be toggled on / off and has a dropdown list of recently used filters:

1. Filter Box Syntax

Filter Syntax is close to Transact-SQL syntax.
The best way to learn it is to experiment using Live-Search which can generates the filter string for you. For that you can either:
Checkboxes are a little different than you might expect (unless you know SQL). For example, for the Checkbox field Followup you would use Followup if you want to search for checked or Followup is null if you want to search for unchecked.

Filter Examples

  • [MyField]                                        : Field has a value for this item
  • [MyField] is not null                            : Field has a value for this item (same as above)
  • [MyField] is Null                                : Field has no value for this item
  • [MyTextField] = "test"                           : field = test
  • [MyTextField] like "*test*"                      : field contains the string test
  • [MyNumberField] = 34
  • [MyDateField] = #2001-12-31#                     :Date = Dec 31th 2001
  • int([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

When you apply a filter, some items may have sub-items. The 'Filter out sub-items' determine what happens when you open an item to show its subs:
  • 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

Each item level can have a different filter. To enable this select Filter Items and Sub-items and enter a list of filter string separated by | . The last filter string applies to deeper item levels.
Format:  Main Filter (level 1) | Sub-items Filter (level 2) | Sub-sub-items Filter (level 3)

3. Saving Filters

Grids remember filters, and keep a history of those (drop down list). So you can create multiple Grids, each with their own Filters.

4. Deleting Filters from the drop down list

To delete a filter in the drop down list : hover your mouse over it to select it an press the Delete key

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:

  1. Tags are not [  ] enclosed, instead, they are preceded with #, i.e. #Tag1
  2. 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:

  1. Due this week: ([DueDate] >= #2022-06-12#)
  2. No due date, i.e. newly created items: ([DueDate] is Null)
  3. Overdue from last week: (([DueDate] < #2022-06-12#) AND ([Done] is Null))
  4. 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)