Navigation:  Using Responsive Time Logger (topic list) >

    Filtering the Time Records

Top  Previous  Next

A filter is one or more conditions that must be met in order for the time records to be displayed in the main window.  For example, Client = ABC Corp is a filter that says, "Only show me time records where the Client is equal to ABC Corp.

This section contains in this order:

Important Filter Facts

An Example Filter

Field - All of the Time Record Fields

Comparison Field

Compare To - Use a Value or Type Your Own

Last Column (and, end, or)

Start Date and End Date's Special Variable Values

Saving Your Filters

Many Filter Examples

 

Important Filter Facts

 

Only the time records matching the current Filter are displayed in the time records list on the main window.  The rest are excluded or "filtered out."

 

To display ALL time records in the current time records database file on the main window, clear the filter. Choose Filter/Clear Filter or press <F6> or click Toolbar_Clear_Filter_Active to clear the filter.

 

Once you have created a filter, it will remain active until you either clear it or change it.

 

Think of reading your filters like a sentence that describes which records you wish to see.

 

The icon, Toolbar_Clear_Filter_No_Filter grayed out means the filter is cleared and you see all time records. When the icon is active: Toolbar_Clear_Filter_Active it means there is a Filter (you do not see all time records) and clicking this button clear the filter.

 

When you stop Time Logger, it saves the current filter and when you start Time Logger it automatically uses the last saved filter.

 

Each row on the Filter Window is a condition.

IMPORTANT: If you can not find time records that you entered, they may simply be excluded by the filter.  Choose Filter/Clear Filter or press <F6> or click Toolbar_Clear_Filter_Active to turn off the filter.

 

An Example Filter

For example, if you wanted to see all of last month's records, you would set your filter to:

       Start Date >= First of Last Month and
       Start Date < First of This Month end

as shown in the screen image below.

The "First of Last Month" and "First of This Month" are special variables.  See: Start Date and End Date's Special Variable Values below for details on how this works.

You could specify your own dates like this as well:

       Start Date >= 9/1/07 and
       Start Date < 10/1/07 end

FilterDialog

 

Field - All of the Time Record Fields

The Field drop-down list contains an alphabetized list of all the fields on a time record.

Select whichever one you wish, including the same one on multiple rows.

NOTE: The field Start is actually the Start Date and Start Time together. There is a known defect in Time Logger version 4x that prevents you from successfully entering a Compare To value for this field and it should not be used in a Filter.

 

Comparison Field

The Comparison field can take one of these values:

=

equals

>

greater than

<

less than

>=

greater than or equals

<=

less than or equals

<>

not equal

contains

contains the string (matches: *string* )

ignores the case (abc matches AbC and aBc)

TIP: The contains can be used to match a string in a field.  It is handy for searching the Description in time records.

For example:

Description contains mouse end

would show you all time records with the word "mouse" anywhere in the Description.

 

Compare To - Use a Value or Type Your Own

When you select a Field: on the Filter window, Time Logger automatically populates the drop-down list in the Compare To: field with corresponding values (if a there are any).  Note that you can either select one of those values, or type in your own.

Here is an example:

Let's assume that you currently bill at two Rates, $90 and $110 and those are the only two Rates you have listed in your Rate Descriptor.  When you select "Rate" as the Field on the Filter window, then the Compare To drop-down list will show 90 and 110.

However, last year you billed at $80 and $100 and you have all of your time records from last year in your time records database.  In this case, if you wanted to see time records that had a Rate of $80, you can type the value 80 into the Compare To field even though the drop-down list only shows 90 and 110.

 

Last Column (and, end, or)

The Last Column - and, end, or

The last column of each row can be "and", "end",  "or".
Use "and" to add filter conditions that all have to be met.
Use "or" to add filter conditions where only one has to be met.
Use "end" to designate the last row (condition) of the filer.

IMPORTANT: Be very careful when you combine "and" with "or".  The resulting filter might not do what you expect.  Time Logger's Filter window is simple quick and effective to use in most cases, however it does not support using parenthesis to group "and" and "or" conditions to deliver what you want.  For this reason, Time Logger lets you modify the Structured Query Language (SQL) statement that is built from the Filter.

The Problem...

For example, if you want to filter time records where Client is ABC Corp and the Project is one of three (Build Website, Revise Help, Test System) the following will NOT work in the Filter window:

Client = ABC Corp and
Project = Build Website or
Project = Revise Help or
Project = Test System end

Warning: BAD Filter - used for example only!!!

The above Filter shows time records where A) Client is ABC Corp and Project is Build Website, or B) Project is Revise Help, or C) Project is Test System.  While the filter "works" it is not what you want.

The solution...

However, build the above Filter and then select Advanced/SQL Command and change the statement by just adding parenthesis around the three "or" conditions as illustrated in the Before and After below and click OK and the Filter will work just as you intended.

 

Before

select StartDate, StartTime, Client, Subproject, EndTime, Project, Description, Duration, [Key] from TimeRecords

Where Client= 'ABC Corp'

and Project= 'Build Website'

or Project= 'Revise Help'

or Project= 'Test System'

Order By Start

After

Added the two parenthesis around the three "or" conditions. Color added for emphasis.

select StartDate, StartTime, Client, Subproject, EndTime, Project, Description, Duration, [Key] from TimeRecords

Where Client= 'ABC Corp'  and

(Project= 'Build Website'

or Project= 'Revise Help'

or Project= 'Test System' )

Order By Start

 

Start Date and End Date's Special Variable Values

Both Start Date and End Date have special variable values that get replaced with actual dates.  When you build filters where all of the dates use these special variable values, the filter can be used at any time in the future and it will effectively apply to the same date range.

These special variable values are:

First of Last Month
First of Last Week
First of Last Year
First of This Month
First of This Week
First of This Year
Today
Yesterday

Below is a thorough explanation of how the following Filter works.

Start Date >= First of Last Month and
Start Date < First of This Month end

Note that by specifying Start Date >= [greater than or equal] First of Last Month, we are including time records that were started on or after the first of last month (ie: 9/1/07 if today is 10/15/07).

We can then complete the date range for the month by adding and Start Date < [less than] First of This Month which says that we also want (because of and) the time records that were started before and not on the first of this month (ie: 10/1/07 if today is 10/15/07 - which would mean time records started on 9/30/07 would be included, while those started on 10/1/07 or more recently would not be include).

 

Saving Your Filters

You can save your Filters in an Environment file.  You can give the Environment file a logical file name like: "Filter - Last Months Records.ev4" (you cannot use special characters in a file name).

Whenever you want to use your saved Filter, just select Tools/Load Environment: Filter - Last Months Records (Time Logger shows you an alphabetized list of the first 30 Environments on the Tools menu).

TIP: If you're only saving a Filter, be sure that only the Filter checkbox is checked when you save your Environment file.

See Saving your Settings In Environments for more on this.

 

Many Filter Examples

Here are additional examples to help understand how filters work:


This filter:

       Client = AR Software or
       Client = Microsoft end

Shows this: All records for which AR Software or Microsoft is the client.


This filter:

       Client = AR Software and
       Billed = No end

Shows this: All records for AR Software that have not yet been billed.


This filter:

       Person = Mary Smith and
       Invoice = 2033 end

Shows this: All of Mary Smith's records that appeared on invoice number 2033.


This filter:

       Description contains W2 end

Shows this: All records for which contain the text "W2" somewhere in their description.


This filter:

       Client = AR Software or
       Client = Microsoft and
       Person = Mary Smith end

Shows this: All records which either have AR Software as the client or have Microsoft as the client and Mary Smith as the Person.  That is, work performed for Microsoft by John Doe will not appear.  Note that filters like this are tricky, since you might have expected it to show all of Mary Smith's records for AR Software or Microsoft.  In cases in which both "and" and "or" appear, the and's are evaluated first.  If you'd like more control over this – that is, if you'd like to use parenthesis to control how the filter is evaluated, see Filtering Time Records via SQL.


This filter:

       Start Time < 8:00 AM and
       Person = Arthur Lindquist end

Answers this: Does Arthur ever start working before 8 o'clock?


This filter:

       Mileage > 120 end

Shows this: All records that include a trip of more than 120 miles.


This filter:

       Project = EasyImage and
       Person = Mary Smith end

Answers this: Has Mary worked on the EasyImage project?  If so, how many hours?


This filter:

       Duration < 2 minutes and
       Expense = 0 and
       Mileage = 0 end

Answers this: How often do we bill for very small amounts of work?


More:

Filtering Time Records via SQL